Format
#include <wctype.h> wctype_t wctype(const char *property);
Language Level: ANSI 93, XPG4
wctype returns a handle for the specified
character class from the LC_CTYPE category. You can
then use this handle with the iswctype function to determine if a
given wide character belongs to that class.
The following strings correspond to the standard (basic) character classes or properties:
| "alnum | "cntrl" | "lower" | "space" |
| "alpha" | "digit" | "print" | "upper" |
| "blank" | "graph" | "punct" | "xdigit" |
On OS/2 and Windows, you can also give the name of a user-defined class, as specified in a locale definition file, as the property argument.
The behavior of this wide-character function is affected by the LC_CTYPE category of the current locale.
Return Value
wctype returns a value of type wctype_t
that represents the property and can be used in calls to
iswctype. If the given property is not valid for the
current locale (LC_CTYPE category), wctype returns 0.
Values returned by wctype are valid until a call to setlocale that modifies the LC_CTYPE category.
![]()
iswalnum to iswxdigit --
Test Wide Integer Value
iswctype -- Test
for Character Property
<wchar.h>