LetterQ

LetterQ[string]

yields True if all the characters in the string are letters, and yields False otherwise.

Details

  • LetterQ[string] by default gives False if string contains any space or punctuation characters.
  • LetterQ handles both ordinary and special characters.
  • LetterQ treats as letters all special characters explicitly listed as letters in the table in "Named Characters".
  • In general, LetterQ treats as letters all characters that appear as ordinary text in any language.
  • LetterQ treats as letters such special characters as α, , , and æ.
  • LetterQ does not treat as letters (\[EmptySet]), (\[HBar]), (\[Angstrom]), or (\[Sum]).

Examples

open allclose all

Basic Examples  (1)

Test whether a character is a letter:

Scope  (6)

Test whether all characters in a string are letters:

Punctuation is not a letter:

Accented letters are still treated as letters:

Gothic letters are treated as letters:

Greek letters are treated as letters:

Characters that are not letters in ordinary natural language are not treated as letters:

Generalizations & Extensions  (1)

Letters from different character ranges corresponding to different languages:

Properties & Relations  (1)

All characters treated as letters:

Possible Issues  (1)

Contiguous characters in character space may not all be letters:

An actual script-B character is nevertheless a letter:

Neat Examples  (1)

Plot the character codes of letters:

Include the actual names of characters:

Wolfram Research (1991), LetterQ, Wolfram Language function, https://reference.wolfram.com/language/ref/LetterQ.html (updated 1996).

Text

Wolfram Research (1991), LetterQ, Wolfram Language function, https://reference.wolfram.com/language/ref/LetterQ.html (updated 1996).

CMS

Wolfram Language. 1991. "LetterQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/LetterQ.html.

APA

Wolfram Language. (1991). LetterQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LetterQ.html

BibTeX

@misc{reference.wolfram_2024_letterq, author="Wolfram Research", title="{LetterQ}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/LetterQ.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_letterq, organization={Wolfram Research}, title={LetterQ}, year={1996}, url={https://reference.wolfram.com/language/ref/LetterQ.html}, note=[Accessed: 21-November-2024 ]}