# wctype

## PROLOG



           This manual page is part of the POSIX Programmer's Manual.  The
           Linux implementation of this interface may differ (consult the
           corresponding Linux manual page for details of Linux behavior), or
           the interface may not be implemented on Linux.
    


## NAME



           wctype, wctype_l — define character class
    


## SYNOPSIS



           #include <wctype.h>
    
           wctype_t wctype(const char *_property_);
           wctype_t wctype_l(const char *_property_ , locale_t _locale_);
    


## DESCRIPTION



           For _wctype_(): The functionality described on this reference page
           is aligned with the ISO C standard. Any conflict between the
           requirements described here and the ISO C standard is
           unintentional. This volume of POSIX.1‐2017 defers to the ISO C
           standard.
    
           The _wctype_() and _wctype_l_() functions are defined for valid
           character class names as defined in the current locale or in the
           locale represented by _locale_ , respectively.
    
           The _property_ argument is a string identifying a generic character
           class for which codeset-specific type information is required. The
           following character class names shall be defined in all locales:
    
                  **alnum   digit   punct**
                  **alpha   graph   space**
                  **blank   lower   upper**
                  **cntrl   print   xdigit**
    
           Additional character class names defined in the locale definition
           file (category _LC_CTYPE_) can also be specified.
    
           These functions shall return a value of type **wctype_t** , which can
           be used as the second argument to subsequent calls of _iswctype_()
           and _iswctype_l_().
    
           The _wctype_() and _wctype_l_() functions shall determine values of
           **wctype_t** according to the rules of the coded character set defined
           by character type information in the current locale or in the
           locale represented by _locale_ , respectively (category _LC_CTYPE_).
    
           The values returned by _wctype_() shall be valid until a call to
           _setlocale_() that modifies the category _LC_CTYPE_.
    
           The values returned by _wctype_l_() shall be valid only in calls to
           _iswctype_l_() with a locale represented by _locale_ with the same
           _LC_CTYPE_ category value.
    
           The behavior is undefined if the _locale_ argument to _wctype_l_() is
           the special locale object LC_GLOBAL_LOCALE or is not a valid
           locale object handle.
    


## RETURN VALUE



           The _wctype_() and _wctype_l_() functions shall return 0 if the given
           character class name is not valid for the current locale (category
           _LC_CTYPE_); otherwise, they shall return an object of type **wctype_t**
           that can be used in calls to _iswctype_() and _iswctype_l_().
    


## ERRORS



           No errors are defined.
    
           _The following sections are informative._
    


## EXAMPLES



           None.
    


## APPLICATION USAGE



           None.
    


## RATIONALE



           None.
    


## FUTURE DIRECTIONS



           None.
    


* * *