iswalnum, iswalpha, iswcntrl, iswdigit, iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit - Classify a wide character
The Standard C Library (libc.so, libc.a)
The XPG4 standard specifies that applications define these functions by including wchar.h rather than wctype.h, as required by the current version of the ISO C standard. Both include statements are supported.
Interfaces documented on this reference page conform to industry standards as follows:
iswalnum(), iswalpha(), iswcntrl(), iswdigit(), iswgraph(), iswlower(), iswprint(), iswpunct(), iswspace(), iswupper(), iswxdigit(): ISO C, XPG4
Refer to the standards(5) reference page for more information about industry standards and associated tags.
Specifies a wide character for testing.
These functions test a wide character wc for membership in a character class in the current locale. Each function tests to see if a wide character is part of a different character class.
If the wide character is part of the character class, these functions return a nonzero value for true; otherwise, they return a value of 0 (zero) for false.
Each function is named by adding the prefix isw to the name of the character class that the function tests. For example, the iswalpha() function tests whether the wide character specified by the wc parameter belongs to the alpha class.
The following list identifies each function and describes the conditions under which it returns a true value: When wc is a character of class alpha or class digit in the program's current locale. When wc is a character of class alpha in the program's current locale. Characters in classes lower and upper automatically belong to class alpha. When wc is a character of class cntrl in the program's current locale. When wc is a character of class digit in the program's current locale. The following characters are included in this class:
These functions determine the class of a wide character based on the LC_CTYPE locale category.
[Digital] The iswdigit(), iswxdigit(), and iswalnum() functions do not recognize Thai digits. Many applications make assumptions about how a digit character can be converted to its numeric equivalent. Changing the functions to recognize Thai digits would break these applications. Refer to TACTIS(5) for more information about Thai digits.
If the wide character tested is part of the particular character class, these functions return a nonzero value; otherwise, they return a value of 0 (zero).
Functions: ctype(3), iswctype(3), setlocale(3), tolower(3), towctrans(3), towlower(3), wctrans(3), wctype(3)
Others: i18n_intro(5), l10n_intro(5), standards(5) delim off