Updated: April 19, 2023 |
Test a wide character to see if it's a given character class
#include <wctype.h> int iswctype( wint_t wc, wctype_t charclass );
libc
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" ) ) |
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.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
The result is valid only for wchar_t arguments and WEOF.