HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
c
ctype(3C) ctype(3C)
NAME
isalpha(), isupper(), islower(), isdigit(), isxdigit(), isalnum(), isspace(), ispunct(), isprint(), isgraph(),
iscntrl(), isascii() - classify characters
SYNOPSIS
#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
DESCRIPTION
These functions classify character-coded integer values according to the rules of the coded character set
identified by the last successful call to setlocale() (see setlocale(3C)). Each function is a predicate
returning non-zero for true, zero for false.
If setlocale() has not been called successfully, characters are classified according to the rules of the
defaultASCII 7-bit coded character set (see setlocale(3C)).
isascii() is defined on all integer values; the other functions are defined for the range
-1 (EOF)
through 255.
The functions return non-zero under the following circumstances; zero otherwise:
isalpha(c) c is a letter.
isupper(c) c is an uppercase letter.
islower(c) c is a lowercase letter.
isdigit(c) c is a decimal digit (in ASCII: characters [0-9]).
isxdigit(c) c is a hexadecimal digit (inASCII: characters [0-9], [A-F] or [a-f]).
isalnum(c) c is an alphanumeric (letters or digits).
isspace(c) c is a character that creates ‘‘white space’’ in displayed text (in
ASCII: space, tab,
carriage return, new-line, vertical tab, and form-feed).
ispunct(c) c is a punctuation character (in ASCII: any printing character except the space
character (040), digits, letters).
isprint(c) c is a printing character.
isgraph(c) c is a visible character (in ASCII: printing characters, excluding the space character
(040)).
iscntrl(c) c is a control character (in ASCII: character codes less than 040 and the delete char-
acter (0177)).
isascii(c) c is any ASCII character code between 0 and 0177, inclusive.
If the argument to any of these functions is outside the domain of the function, the result is undefined.
APPLICATION USAGE
The interfaces isalnum(), isalpha(), iscntrl(), isdigit(), isgraph(), islower(),
isprint(), ispunct(), isspace(), isupper(), isxdigit() and isascii() are thread-safe
and async-cancel-safe.
EXTERNAL INFLUENCES
Section 3−−108 − 1 − HP-UX Release 11i: December 2000
___
___