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

Technical Reference: Base Operating System and Extensions , Volume 2


wctype or get_wctype Subroutine

Purpose

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

Library

Standard C library (libc.a).

Syntax

#include <wchar.h>


wctype_t wctype ( Property)
const char *Property;


wctype_t get_wctype ( Property)
char *Property;

Description

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.

Parameters


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

alnum
Alphanumeric character.

alpha
Alphabetic character.

blank
Space and tab characters.

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

digit
Numeric digit character.

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

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

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

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

space
Space characters.

upper
Uppercase character.

xdigit
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 ]