quoted function Null safety

String quoted(
  1. String input
)

Returns a quoted version of input with contents escaped as a Dart literal.

Implementation

String quoted(String input) {
  final sb = StringBuffer();
  for (final r in input.runes) {
    sb.write(_escapeCharacter(r));
  }
  return '\'${sb.toString()}\'';
}