wctype()

Define a wide-character class

Synopsis:

#include <wctype.h>

wctype_t wctype( const char * property );

Arguments:

property
A string that defines the property of the class; see below.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The wctype() function determines a classification rule for wide-character codes according to the category LC_CTYPE, particularly for use with iswctype() .

Some classes are defined in all locales, although additional classes may be defined for LC_CTYPE. Use setlocale() to modify the category LC_CTYPE.

Defined Classes:

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

Returns:

A wctype_t object that you can use in a call to iswctype() , or 0 if the character class name isn't valid for the current locale.

Classification:

ANSI, POSIX 1003.1

Safety:  
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes

Last modified: 2013-12-23

comments powered by Disqus