NCctype
Purpose
Classify characters for international character support
environments.
Syntax
#include <NLctype.h>
int NCisNLchar (x) | int NCisalnum (x)
int x; | int x;
|
int NCisalpha (x) | int NCisspace (x)
int x; | int x;
|
int NCisupper (x) | int NCispunct (x)
int x; | int x;
|
int NCislower (x) | int NCisprint (x)
int x; | int x;
|
int NCisdigit (x) | int NCisgraph (x)
int x; | int x;
|
int NCisxdigit (x) | int NCiscntrl (x)
int x; | int x;
|
| int NCisshift (x)
| int x;
Description
Character classification is user-configurable per
process, through the table file indicated by the environ-
ment variable NLCTAB.
These macros classify character-coded integer values
using information specified by the current NLCTAB file
configuration. The parameter x is tested as an NLchar
(an extended character); each macro is a predicate form
returning 0 for false, and a non-zero value for true.
The value of x is in the domain of any legal NLchar in a
value range from 0 to NLCHARMAX-1 inclusive, or a special
value of -1. If the value of x is not in the domain of
the macro, the result is undefined.
The NCisNLchar macro is defined on all valid integer
values, whereas the other macros are defined only where
NCisNLchar is true, and on the special value of -1 (EOF).
See "standard i/o library."
When a non-zero value is returned for x:
NCisNLchar x is a valid NLchar with a value between 0
and NLCHARMAX-1, inclusive.
NCisalpha x is an alphabetical character.
NCisupper x is an uppercase alphabetical character.
NCislower x is a lowercase letter.
NCisdigit x is a decimal digit (0-9).
NCisxdigit x is a hexadecimal digit (0-9, A-F (or
a-f)).
NCisalnum x is an alphanumeric character or digit.
NCisspace x is a space, tab, carriage return, new-
line, vertical tab, or form-feed character.
NCispunct x is a punctuation character (neither a
control character nor an alphanumeric char-
acter).
NCisprint x is a printing character (including the
space character).
NCisgraph x is a printing character, excluding the
space character.
NCiscntrl x is an ASCII delete character (0177) or an
ordinary ASCII control character other than
the four single-shift characters.
NCisshift x is one of the four single-shift characters
that is used as the first byte of an
extended character.
Related Information
In this book: "conv," "ctype," "getc, fgetc, getchar,
getw," "NLchar," "standard i/o library," and "environ-
ment."
"Overview of International Character Support" in Managing
the AIX Operating System.