parseHexEscape function

String parseHexEscape(
  1. String hexCode
)

hexCode is the hexCode string without '\u' prefix

Implementation

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