isSuperscript function

bool isSuperscript(
  1. String character
)

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 if character is a superscript, otherwise false.

Implementation

bool isSuperscript(String character) {
  return kSuperscripts.values.contains(character);
}