toEscaped method

String toEscaped({
  1. String encode(
    1. int charCode
    )?,
})

Returns an escaped string. The following characters are escaped

tab
newline
carriage return
"
'
$

Example:

    print("Hello 'world' \n".toEscaped());
    => 'Hello \'world\' \n'

Implementation

String toEscaped({String Function(int charCode)? encode}) =>
    Transform.toEscape(this, encode: encode);