Home

isLetter

isLetter is a predicate used in programming to determine whether a given character is a letter rather than a numeral, punctuation, or symbol. In most contexts, isLetter is tied to Unicode-aware definitions of letters, typically including the Unicode categories Lu (uppercase), Ll (lowercase), Lt (titlecase), Lm (modifier letter), and Lo (other letter), with some implementations also counting certain Letter_Number (Nl) code points as letters. Different languages expose similar functionality under different names, and the exact scope can vary by library.

In common language APIs, isLetter is implemented as follows:

- Java: Character.isLetter(int codePoint) returns true if the code point is a Unicode letter.

- C#: Char.IsLetter(char c) returns true for Unicode letters.

- C/C++: isalpha(int ch) from ctype.h returns a nonzero value for alphabetic characters but is locale-dependent and

- JavaScript: There is no universal built-in isLetter; developers often use Unicode property escapes with regular expressions

- Python: str.isalpha() checks whether all characters in a string are alphabetic; for a single-character string, it

Examples: 'A' and 'é' are letters, so isLetter would be true; '3' and '+' are not letters, so

See also: isAlpha, isDigit, Unicode general categories, character classification.

not
guaranteed
to
be
Unicode-aware
without
additional
libraries.
(for
example,
\p{L}
with
the
u
flag)
to
test
for
letters.
behaves
similarly
to
an
isLetter
check.
isLetter
would
be
false.
Edge
cases
include
characters
from
extended
scripts,
combining
marks,
and
characters
outside
the
BMP;
in
UTF-16-based
environments,
handling
may
require
proper
code
point
processing
rather
than
single
code
units.