unfoldPresentationForms static method
Implementation
static String unfoldPresentationForms(String text) {
bool needs = false;
for (final int code in text.runes) {
if (code >= 0xFB50 && code <= 0xFEFF) {
needs = true;
break;
}
}
if (!needs) return text;
final StringBuffer buffer = StringBuffer();
for (final int code in text.runes) {
final String? replacement = _forms[code];
if (replacement != null) {
buffer.write(replacement);
} else {
buffer.writeCharCode(code);
}
}
return buffer.toString();
}