isSuperscript function
Checks if the given character
is a superscript character.
Utilizes a predefined map of superscript characters, kSuperscripts
,
to perform the check.
-
Parameters:
character
: The character to check.
-
Returns:
true
ifcharacter
is a superscript, otherwisefalse
.
Implementation
bool isSuperscript(String character) {
return kSuperscripts.values.contains(character);
}