getCharacterType function
Returns the BiDi type for a given character.
character
A Unicode character for which to get the BiDi type.
Returns the character bidi CharacterType.
Implementation
CharacterType getCharacterType(int character) {
return characterTypes[character] ?? CharacterType.ltr;
}