6
Identifying Character Traits.
NLS provides tools to identify the traits of a
character. Non-internationalized versions of these routines have been a part
of the standard C offering for years; however, the enhanced NLS versions can
correctly identify the traits of characters in
all
supported languages (If the
correct environmental initialization has been successful).
All the routines included in this grouping return a non-zero integer
if the
indicated condition is satisfied. For more information about these routines refer
to ctype(3C) in the HP- UX Reference.
Table 6-12. Character Identification Routines
Routine
Condition
isalpha( c)
Is an alphabetic character.
isupper( c)
Is an uppercase alphabetic character.
islower(c)
Is a lowercase alphabetic character.
isdigit(c)
Is a decimal digit.
isxdigit(c)
Is a hexadecimal digit.
isalnum(c)
Is an alphanumeric character.
isspace( c)
Is a tab, new-line, space, or any character that creates
"white space" in displayed text.
ispunct
(c)
Is a punctuation character.
isprint( c)
Is a printing character.
isgraph( c)
Is a character with a visible representation.
iscntrl(c)
Is a control character.
isascii( c)
Is a ASCII character.
6-24
Developing International Software