[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2

wctype or get_wctype Subroutine


Obtains a handle for valid property names in the current locale for wide characters.


Standard C library (libc.a).


#include <wchar.h>

wctype_t wctype ( Property)
const char *Property;

wctype_t get_wctype ( Property)
char *Property;


The wctype subroutine obtains a handle for valid property names for wide characters as defined in the current locale. The handle is of data type wctype_t and can be used as the WC_PROP parameter in the iswctype subroutine. Values returned by the wctype subroutine are valid until the setlocale subroutine modifies the LC_CTYPE category. The get_wctype subroutine is identical to the wctype subroutine.


Property Points to a string that identifies a generic character class for which code set-specific information is required. The basic character classes are:

Alphanumeric character.

Alphabetic character.

Space and tab characters.

Control character. No characters in alpha or print are included.

Numeric digit character.

Graphic character for printing. Does not include the space character or cntrl characters, but does include all characters in digit and punct.

Lowercase character. No characters in cntrl, digit, punct, or space are included.

Print character. Includes characters in graph, but does not include characters in cntrl.

Punctuation character. No characters in alpha, digit, or cntrl, or the space character are included.

Space characters.

Uppercase character.

Hexadecimal character.

Return Values

Upon successful completion, the subroutine returns a value of type wctype_t, which is a handle for valid property names in the current locale. Otherwise, it returns a value or - 1 if the Property parameter specifies a character class that is not valid for the current locale.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

The wctype subroutine adheres to Systems Interface and Headers, Issue 4 of X/Open.

Related Information

The iswalnum subroutine, iswalpha subroutine, iswcntrl subroutine, iswctype subroutine, iswdigit subroutine, iswgraph subroutine, iswlower subroutine, iswprint subroutine, iswpunct subroutine, iswspace subroutine, iswupper subroutine, iswxdigit subroutine, setlocale (setlocale Subroutine) subroutine, towlower (towlower Subroutine) subroutine, towupper (towupper Subroutine) subroutine.

National Language Support Overview for Programming, Subroutines Overview, Understan ding Wide Character Classification Subroutines in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]