Home

iswalpha

Iswalpha is a wide-character classification function in the C standard library. It tests whether a given wide character is alphabetic according to the current locale. It is declared in the header <wctype.h> and has the signature int iswalpha(wint_t wc). The argument wc should be a value representable as wint_t (for example a wchar_t converted to wint_t); WEOF is not a valid input. The function returns a nonzero value if wc belongs to the alphabetic category (the Alpha class) of the current LC_CTYPE locale, and zero otherwise.

Locale dependence: The result depends on the program’s current locale, set via setlocale or the appropriate

Relation to other functions: iswalpha is the wide-character counterpart to isalpha from <ctype.h>. On some platforms,

Notes: Proper use requires passing a valid wide character value representable as wint_t; passing an invalid

locale
mechanisms.
In
the
default
"C"
or
"POSIX"
locale,
only
ASCII
letters
are
considered
alphabetic.
In
other
locales,
letters
from
additional
scripts
may
be
classified
as
alphabetic,
depending
on
the
locale
data
provided
by
the
implementation.
iswalpha
may
be
defined
as
a
macro.
Some
environments
provide
a
locale-specific
variant
such
as
iswalpha_l
to
select
a
particular
locale
without
affecting
the
global
locale.
value
or
WEOF
leads
to
undefined
or
unspecified
behavior
depending
on
the
implementation.
Classification
relies
on
the
underlying
locale
data
and
wide-character
encoding
used
by
the
platform.