parseHexEscape function
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++) {
final hc = int.tryParse(hexCode[i], radix: 16);
if (hc != null) {
charCode = charCode * 16 + hc;
}
}
return String.fromCharCode(charCode);
}