The following functions are used for character classification and return a non-zero value for true, and 0 for false. With the exception of the isascii() function, all other functions are locale sensitive, specifically for the LC_CTYPE category of the current locale.
Test for an alphabetic character
Test for an alphanumeric character
Test for a 7-bit US-ASCII character
Test for a blank character
Test for a control character
Test for a decimal digit
Test for a visible character
Test for a lowercase letter
Test for a printable character
Test for a punctuation character
Test for a white-space character
Test for an uppercase letter
Test for a hexadecimal digit
These functions should not be used in a locale with a multibyte codeset, such as UTF-8. Use the wide-character classification functions described in the following section for multibyte codesets.
The behavior of some of these functions also depends on the compiler options used at compile time. The ctype(3C) man page describes the "Default" and "Standard conforming" behaviors for isalpha(), isgraph(), isprint(), and isxdigit() functions. For example, isalpha() function is defined as follows:
Tests for any character for which isupper() or islower() is true.
Tests for any character for which isupper() or islower() is true, or any character that is one of the current locale-defined set of characters for which none of iscntrl(), isdigit(), ispunct(), or isspace() is true. In the C locale, isalpha() returns true only for the characters for which isupper() or islower() is true.
This has consequences for languages or alphabets which have no case for its letters (also called unicase), such as Arabic, Hebrew or Thai. For alphabetic characters such as aleph (0xE0) in the Hebrew legacy locale he_IL.ISO8859-8, the functions isupper() and islower() always return false. Therefore, even the isalpha() function always returns false. If compiler options are enabled for the standard conforming behavior, the isalpha() function returns true for such characters. For more information, see the isalpha(3C) and standards(5) man pages.
See also the Oracle Solaris Studio 12.3: C User's Guide, ctype(3C), and SUSv3(5) man pages.