iswctype()

tests if wide character is of specified type 

Function


SYNOPSIS

#include <wctype.h>

int iswctype(wint_t wc, wctype_t charclass);

int iswctype_l(wint_t wc, wctype_t charclass, locale_t locale);


DESCRIPTION

The iswctype() function tests whether the wide character code wc has the character class charclass.

The behavior of the iswctype() function is affected by the current locale. To modify the behavior, change the LC_CTYPE category in setlocale(), that is, setlocale(LC_CTYPE, new_locale).

iswctype_l() behaves in the same way as iswctype() without the _l suffix, but uses the specified locale rather than the global or per-thread locale. A locale_t is returned by newlocale().


PARAMETERS

wc 

Is a wide character code corresponding to a valid character in the current locale or the value of the macro WEOF.

charclass 

Is a character class.

locale 

Is a locale_t perhaps returned by newlocale() or LC_GLOBAL_LOCALE or 0 for the current thread locale set with uselocale().


RETURN VALUES

The iswctype() and iswctype_l() functions return non-zero for true and zero for false. If wc is not in the domain of the function and charclass is invalid, the behavior is undefined.


CONFORMANCE

ANSI/ISO 9899-1990/AM 1-1995.


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

The function iswctype() is MT-Safe as long as no thread calls setlocale() while this function is executing.

The function iswctype_l() is MT-Safe as long as no thread calls freelocale() on locale while this function is executing.


PORTING ISSUES

In the following table, the function call on the left is equivalent to the function call on the right.

iswalnum(wc) iswctype(wc, wctype("alnum"))
iswalpha(wc) iswctype(wc, wctype("alpha"))
iswcntrl(wc) iswctype(wc, wctype("cntrl"))
iswdigit(wc) iswctype(wc, wctype("digit"))
iswgraph(wc) iswctype(wc, wctype("graph"))
iswlower(wc) iswctype(wc, wctype("lower"))
iswprint(wc) iswctype(wc, wctype("print"))
iswpunct(wc) iswctype(wc, wctype("punct"))
iswspace(wc) iswctype(wc, wctype("space"))
iswupper(wc) iswctype(wc, wctype("upper"))
iswxdigit(wc) iswctype(wc, wctype("xdigit"))
iswalnum_l(wc, locale) iswctype(wc, wctype("alnum"), locale)
iswalpha_l(wc, locale) iswctype(wc, wctype("alpha"), locale)
iswcntrl_l(wc, locale) iswctype(wc, wctype("cntrl"), locale)
iswdigit_l(wc, locale) iswctype(wc, wctype("digit"), locale)
iswgraph_l(wc, locale) iswctype(wc, wctype("graph"), locale)
iswlower_l(wc, locale) iswctype(wc, wctype("lower"), locale)
iswprint_l(wc, locale) iswctype(wc, wctype("print"), locale)
iswpunct_l(wc, locale) iswctype(wc, wctype("punct"), locale)
iswspace_l(wc, locale) iswctype(wc, wctype("space"), locale)
iswupper_l(wc, locale) iswctype(wc, wctype("upper"), locale)
iswxdigit_l(wc, locale) iswctype(wc, wctype("xdigit"), locale)


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
iswalnum(), iswalnum_l(), iswalpha(), iswalpha_l(), iswcntrl(), iswcntrl_l(), iswdigit(), iswdigit_l(), iswgraph(), iswgraph_l(), iswlower(), iswlower_l(), iswprint(), iswprint_l(), iswpunct(), iswpunct_l(), iswspace(), iswspace_l(), iswupper(), iswupper_l(), iswxdigit(), iswxdigit_l(), newlocale(), setlocale(), wctype()


PTC MKS Toolkit 10.4 Documentation Build 39.