parseHexEscape function

String parseHexEscape(
  1. String hexCode
)

hexCode is the hexCode string without '\u' prefix

Implementation

String parseHexEscape(String hexCode) {
  int charCode = 0;
  final minLength = min(hexCode.length, 4);
  for (int i = 0; i < minLength; i++) {
    charCode = charCode * 16 + int.tryParse(hexCode[i], radix: 16);
  }
  return String.fromCharCode(charCode);
}