isAlphabetic method

bool isAlphabetic()

Returns true if the the target string contains only letters Note that spaces are counted as alphabetic

For example:

  • 'Lumberjack'.isAlphanumeric() -> true
  • 'I want to swim'.isAlphanumeric() -> true
  • 'Food123'.isAlphanumeric() -> false

Implementation

bool isAlphabetic() {
  return alphabeticRegex.hasMatch(this);
}