Test a wide character to see if it's a given character class
#include <wctype.h> int iswctype( wint_t wc, wctype_t charclass );
- The wide character you want to test.
- The character class you want to test for. Get this class by calling wctype() .
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The iswctype() function tests if the argument wc is a member of one or several character classes. For example:
|This function:||Is equivalent to:|
|iswalnum( wc )||iswctype( wc , wctype( "alnum" ) )|
|iswalpha( wc )||iswctype( wc , wctype( "alpha" ) )|
|ispunct( wc )||iswctype( wc , wctype( "punct" ) )|
The results are unreliable if you didn't use wctype() to obtain charclass, or if a call to setlocale() affects LC_CTYPE.
A nonzero value if the character is a member of the specified character class (or classes), or zero if the character isn't a member or charclass is 0.
The result is valid only for wchar_t arguments and WEOF.
Last modified: 2013-12-23