unescape method

String unescape(
  1. String v
)

Implementation

String unescape(String v) => v.replaceAllMapped(
    RegExp("\\\\[nrtbf\"']"),
    (v) => const {
          'n': '\n',
          'r': '\r',
          't': '\t',
          'b': '\b',
          'f': '\f',
          'v': '\v',
          "'": "'",
          '"': '"'
        }[v.group(0)!.substring(1)]!);