wctype(S)
returns a value of type wctype_t, corresponding to the
string pointed to by charclass. When
iswctype(S)
is called next, this returned value may be passed as its
second argument to test whether a wide character wc
belongs to the class
charclass.
The string charclass is the name of a generic
character class for which codeset-specific type information is
requested. The following twelve character class names are defined in all
locales:
alnum
alpha
blank
cntrl
digit
graph
lower
print
punct
space
upper
xdigit
If more character class names are defined in the locale definition
file (category LC_CTYPE), these names can also be
used as the argument to
wctype( ).
wctype( )
returns a useful result only when a valid character class name in the current
locale is passed to it.
The rules of the coded character set are defined by type information
in the program's locale (category LC_CTYPE)
and these rules determine the values of wctype_t.
Until the category LC_CTYPE
is modified by
setlocale(S),
the value returned by
wctype( )
remains valid.
Return values
wctype( )
returns a value of type wctype_t, which corresponds to
a valid character class name in the current locale (category
LC_CTYPE).
Zero is returned if an invalid character class name is given.