getText method
Implementation
String getText([int? from, int? to]) {
if (from == null || from < 0) {
from = 0;
}
if (to == null || to > _length) {
to = _length;
}
final builder = StringBuffer();
for (var i = from; i < to; i++) {
final codePoint = getCodePoint(i);
final width = getWidth(i);
if (codePoint != 0 && i + width <= to) {
builder.writeCharCode(codePoint);
}
}
return builder.toString();
}