logicalToVisual function
Implementation of the BIDI algorithm, as described in http://www.unicode.org/reports/tr9/tr9-17.html
logicalString
is the original logical-ordered string. Returns the visual representation of the string.
Implementation
List<int> logicalToVisual(String logicalString) {
final paragraphs = BidiString.fromLogical(logicalString).paragraphs;
final sb = <int>[];
for (final p in paragraphs) {
sb.addAll(p.bidiText);
}
return sb;
}