wctype, wctype_l - define character class
#include <wchar.h> wctype_t wctype(const char *charclass); wctype_t wctype_l(const char *charclass, locale_t locale);
The wctype() and wctype_l() functions are defined for valid character class names as defined in the current locale or in the locale represented by locale, respectively. The charclass is a string identifying a generic character class for which codeset-specific type information is required. The following character class names are defined in all locales:
|
Additional character class names defined in the locale definition file (category LC_CTYPE) can also be specified.
These functions return a value of type wctype_t, which can be used as the second argument to subsequent calls of iswctype(3C) and iswctype_l(3C).
The wctype() and wctype_l() determine values of wctype_t according to the rules of the coded character set defined by character type information in the current locale or locale represented by locale (category LC_CTYPE).
The values returned by wctype() are valid until a call to setlocale(3C) that modifies the category LC_CTYPE.
The values returned by wctype_l() are valid only in calls to iswctype_l() with a locale represented by locale with the same LC_CTYPE category value.
The behavior is undefined if the locale argument to wctype_l() is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.
The wctype() and wctype_l() functions return 0 if the given character class name is not valid for the current locale or for locale represented by locale, respectively (categoryLC_CTYPE); otherwise it returns an object of type wctype_t that can be used in calls to iswctype() and iswctype_l().
See attributes(7) for descriptions of the following attributes:
|
duplocale(3C), freelocale(3C), iswctype(3C), newlocale(3C), setlocale(3C), uselocale(3C), attributes(7), standards(7)