wctype(3C)wctype(3C)NAMEwctype(), iswalpha(), iswblank(), iswupper(), iswlower(), iswdigit(),
iswxdigit(), iswalnum(), iswspace(), iswpunct(), iswprint(), isw‐
graph(), iswcntrl(), iswctype() - classify wide characters
These functions are compliant with the XPG4 Worldwide Portability
Interface wide-character classification functions. They parallel the
8-bit character classification functions defined in ctype(3C).
These functions classify wide character values according to the rules
of the coded character set identified by the last successful call to
If has not been called successfully, characters are classified accord‐
ing to the rules of the default ASCII 7-bit coded character set (see
Each of the classification functions is a predicate that returns non-
zero for true, zero for false.
is defined for valid character class names as defined in the current
locale. charclass is a string identifying a generic character class
for which codeset-specific type information is required. The following
class names are defined in all locales: and User-defined class names
may be specified if supported by the current locale as defined by (see
setlocale(3C)). returns a value of type that can be used in a subse‐
quent call to or if charclass is not valid in the current locale.
The classification functions return non-zero under the following cir‐
cumstances, and zero otherwise:
wc has the property defined by prop.
wc is a letter.
wc is a blank character; that is a space or
wc is an uppercase letter.
wc is a lowercase letter.
wc is a decimal digit (in ASCII: characters
wc is a hexadecimal digit (in ASCII: characters
[0-9], [A-F] or [a-f]).
wc is an alphanumeric (letters or digits).
wc is a character that creates "white space" in
displayed text (in ASCII: space, tab, car‐
riage return, new-line, vertical tab, and
wc is a punctuation character (in ASCII: any
printing character except the space charac‐
ter (040), digits, letters).
wc is a printing character.
wc is a visible character (in ASCII: printing
characters, excluding the space character
wc is a control character (in ASCII: character
codes less than 040 and the delete character
If the argument to any of these functions is outside the domain of the
function, the result is 0 (false).
Definitions for these functions and the types and are provided in the
The category determines the classification of character type.
International Code Set Support
Single-byte and multibyte character code sets are supported.
was developed by IBM, OSF, and HP.
SEE ALSOctype(3C), multibyte(3C), setlocale(3C), ascii(5), thread_safety(5).