ISALPHA
NAME
isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
isprint, ispunct, isspace, isupper, isxdigit - character
classification routines
SYNOPSIS
#include <ctype.h>
I int isalnum(int c );
I int isalpha(int c );
I int isascii(int c );
I int isblank(int c );
I int iscntrl(int c );
I int isdigit(int c );
I int isgraph(int c );
I int islower(int c );
I int isprint(int c );
I int ispunct(int c );
I int isspace(int c );
I int isupper(int c );
I int isxdigit(int c );
DESCRIPTION
These functions check whether
R c ,
which must have the value of an
unsigned char
or
R EOF ,
falls into a certain character class according to the current locale.
R isalnum ()
checks for an alphanumeric character; it is equivalent to
I (isalpha( c ) || isdigit( c )) .
R isalpha ()
checks for an alphabetic character; in the standard "C"
locale, it is equivalent to
I (isupper( c ) || islower( c )) .
In some locales, there may be additional characters for which
R isalpha ()
is trueletters which are neither upper case nor lower
case.
R isascii ()
checks whether c is a 7-bit
unsigned char
value that fits into
the ASCII character set.
R isblank ()
checks for a blank character; that is, a space or a tab.
R iscntrl ()
checks for a control character.
R isdigit ()
checks for a digit (0 through 9).
R isgraph ()
checks for any printable character except space.
R islower ()
checks for a lower-case character.
R isprint ()
checks for any printable character including space.
R ispunct ()
checks for any printable character which is not a space or an
alphanumeric character.
R isspace ()
checks for white-space characters.
In the
C
and
POSIX
locales, these are: space, form-feed
('\f'),
newline
('\n'),
carriage return
('\r'),
horizontal tab
('\t'),
and vertical tab
('\v').
R isupper ()
checks for an uppercase letter.
R isxdigit ()
checks for a hexadecimal digits, that is, one of
R 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F .
RETURN VALUE
The values returned are non-zero if the character
c
falls into the tested class, and a zero value
if not.
CONFORMING TO
C99, 4.3BSD.
C89 specifies all of these functions except
R isascii ()
and
R isblank ().
R isascii ()
is a BSD extension
and is also an SVr4 extension.
R isblank ()
conforms to POSIX.1-2001 and C99 7.4.1.3.
NOTES
The details of what characters belong into which class depend on the current
locale.
For example,
R isupper ()
will not recognize an A-umlaut () as an uppercase letter in the default
C
locale.
SEE ALSO
iswalnum(3),
iswalpha(3),
iswblank(3),
iswcntrl(3),
iswdigit(3),
iswgraph(3),
iswlower(3),
iswprint(3),
iswpunct(3),
iswspace(3),
iswupper(3),
iswxdigit(3),
setlocale(3),
tolower(3),
toupper(3),
ascii(7),
locale(7)