iswctype(3C) iswctype(3C)
NAME
iswctype, wctype - test wide characters for a particular
class.
SYNOPSIS
#include <wchar.h>
int iswctype(wint_t wc, wctype_t prop);
wctype_t wctype(const char *charclass);
DESCRIPTION
iswctype checks whether the wide character wc is of the wide
character class prop, the value of which is returned by a
previous successful call to wctype. iswctype returns zero for
false and non-zero for true. The function is defined on WEOF
and wide characters that correspond to valid wide character
encodings in the current locale. A change to the LC_CTYPE
category of the current locale invalidates an existing prop.
wctype is defined for valid wide character class names that
have a definition in the current locale. charclass is a
string that identifies a generic wide character class. For
this, codeset-specific information is needed. The wide
character class names that are supported in all locales are
listed below.
Return Values
iswctype returns zero for false and nonzero for true. wctype
returns a value that is of the type wctype_t. This value can
then be used as a second argument to subsequent calls to
iswctype. If charclass is not supported, wctype returns zero.
USAGE
The following twelve strings are reserved for the standard
character classes: "alnum", "alpha", "blank", "cntrl",
"digit", "graph", "lower", "print", "punct", "space", "upper"
and "xdigit".
The functions found on the left are equivalent to the iswctype
calls on the right.
iswalpha(wc) iswctype(wc, wctype("alpha"))
iswupper(wc) iswctype(wc, wctype("upper"))
iswlower(wc) iswctype(wc, wctype("lower"))
iswdigit(wc) iswctype(wc, wctype("digit"))
iswxdigit(wc) iswctype(wc, wctype("xdigit"))
iswalnum(wc) iswctype(wc, wctype("alnum"))
iswspace(wc) iswctype(wc, wctype("space"))
Copyright 1994 Novell, Inc. Page 1
iswctype(3C) iswctype(3C)
iswpunct(wc) iswctype(wc, wctype("punct"))
iswprint(wc) iswctype(wc, wctype("print"))
iswgraph(wc) iswctype(wc, wctype("graph"))
iswcntrl(wc) iswctype(wc, wctype("cntrl"))
There is no isw* function equivalent to the call:
iswctype(wc, wctype("blank"))
REFERENCES
wctype(3C)
Copyright 1994 Novell, Inc. Page 2