isLetter

Selects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to isAlpha. This function returns True if its argument has one of the following GeneralCategorys, or False otherwise: These classes are defined in the Unicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Letter".

Examples

Basic usage:
>>> isLetter 'a'
True

>>> isLetter 'A'
True

>>> isLetter 'λ'
True

>>> isLetter '0'
False

>>> isLetter '%'
False

>>> isLetter '♥'
False

>>> isLetter '\31'
False
Ensure that isLetter and isAlpha are equivalent.
>>> let chars = [(chr 0)..]

>>> let letters = map isLetter chars

>>> let alphas = map isAlpha chars

>>> letters == alphas
True
Selects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function returns True if its argument has one of the following GeneralCategorys, or False otherwise:
  • UppercaseLetter
  • LowercaseLetter
  • TitlecaseLetter
  • ModifierLetter
  • OtherLetter
Note: this function is not equivalent to isAlphabetic. See the description of isAlphabetic for further details.
isLetter c == Data.Char.isLetter c
Is this an alphabet character. Only works for the Latin1 subset, otherwise returns sFalse.
>>> prove $ \c -> isLetterL1 c .<=> isAlphaL1 c
Q.E.D.
Letters that when pronounced independently in English sound like they begin with vowels.
isLetterWithInitialVowelSound 'r' == True
isLetterWithInitialVowelSound 'k' == False
(In the above, 'r' is pronounced "are", but 'k' is pronounced "kay".)