characterUnicode method

Parser<String> characterUnicode()

Implementation

Parser<String> characterUnicode() => seq2(
      string('\\u'),
      pattern('0-9A-Fa-f').timesString(4, '4-digit hex number expected'),
    ).map2((_, value) => String.fromCharCode(int.parse(value, radix: 16)));