escape static method

String escape(
  1. String value
)

Escapes all characters of the given string that are not allowed to occur unescaped in a basic string.

Implementation

static String escape(String value) {
  var buffer = StringBuffer();
  for (var rune in value.runes) {
    TomlEscapedChar.writeEscapedChar(rune, buffer, unescapedParser);
  }
  return buffer.toString();
}