#include <wctype.h>
|
|
int
iswctype (wint_t wc, wctype_t charclass); |
|
wctype_t
wctype (const char *property); |
The wctype function returns 0 if property is invalid, otherwise it returns a value of type wctype_t that can be used in subsequent calls to iswctype.
The following character class names are recognised:
| alnum cntrl ideogram print space xdigit
alpha digit lower punct special blank graph phonogram rune upper |
|
The iswctype function checks whether the wide character wc is in the character class charclass.
The behavior of the iswctype ans wctype is affected by LC_CTYPE category of the current locale.
int
myiswalpha(wint_t wc)
{
return (iswctype(wc, wctype("alpha")));
}
#include <wchar.h>
/* Illustrates how to use wctype API */
wctype_t example_wctype()
{
wctype_t type;
/* get the type by passing the operation string to the wctype API */
type = wctype("alnum");
/* if the operation is successful then it should return non-zero value */
/* else returns 0 */
return type;
}
The iswctype and wctype functions conform to -p1003.1-2001. The "ideogram", "phonogram" "special", and "rune" character classes are extensions.
The iswctype and wctype functions first appeared in 5.0 .
Feedback
For additional information or queries on this page send feedback
|
© 2005-2007 Nokia |