iswctype()
QNX SDP8.0C Library ReferenceAPIDeveloper
Test a wide character to see if it's a given character class
Synopsis:
#include <wctype.h>
int iswctype( wint_t wc,
wctype_t charclass );
Arguments:
- wc
- The wide character you want to test.
- charclass
- The character class you want to test for. Get this class by calling wctype().
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
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" ) ) |
Note:
The results are unreliable if you didn't use wctype() to obtain
charclass, or if a call to
setlocale()
affects LC_CTYPE.
Returns:
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.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Caveats:
The result is valid only for wchar_t arguments and WEOF.
Page updated: