toEscaped static method
Returns an escaped string.
If string is null then an empty string is returned.
The following characters are escaped
tab newline carriage return " ' $
Example:
print(toEscaped("Hello 'world' \n"));
=> Hello \'world\' \n
Implementation
static String toEscaped(
String? string, {
String Function(int charCode)? encode,
}) => Transform.toEscape(string, encode: encode);