iswctype function — Tests any category of a wide character
int iswctype(wint_t wc, wctype_t desc)
The iswctype
function tests
any category of the wide character wc
. The category to test is specified by
desc
, which must be obtained by
calling wctype
. The setting of
the LC_CTYPE
category must be the
same for the call to iswctype
and
the call to wctype
that returned
desc
.
Using iswctype
, you can
implement all the isw
. . .
functions. For example, you can implement the iswalnum
function as follows:
int iswalnum(wint_t wc) { return std::iswctype(wc, std::wctype("alnum")); }