wctype(), wctyoe_l()

define character class 

Function


SYNOPSIS

#include <wctype.h>

wctype_t wctype(const char *property);

#include <locale.h>

wctype_t wctype_l(const char *property, locale_t locale);


DESCRIPTION

The wctype() and wctype_l() functions are defined for valid character class names defined in the current or specified locale. The specified property is a string identifying a generic character class for which codeset-specific information is required. The following character classes are defined in all locales:

"alnum"     "alpha"     "blank"     "cntrl"     "digit"
"graph"     "lower"     "print"     "punct"     "space"
"upper"     "xdigit"

The functions return a value of type wctype_t, which can be used as the second argument to subsequent calls to iswctype() and iswctype_l(). The wctype() and wctype_l() functions determine values of wctype_t according to the rules of the coded character set defined by character mapping information in the program's or thread's or specfied locale (category LC_CTYPE). The values returned by wctype() and wctype_l() are valid until a call to setlocale() or uselocale() that modifies the process of thread category LC_CTYPE.


PARAMETERS

property 

Is a character class name defining a class descriptor to be returned.

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

On success, wctype() and wctype_l() return a non-zero object of type wctype_t that can be used in calls to iswctype() and iswctype_l(). Otherwise it returns 0.


CONFORMANCE

wctype() conforms to ANSI/ISO 9899-1990/AM 1-1995


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

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

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


PORTING ISSUES

None.


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:
iswctype(), iswctype_;(), newlocale(), setlocale(), uselocale()


PTC MKS Toolkit 10.4 Documentation Build 39.