#include <stdlib.h>
memset | |||||
isalnum | isalpha | isascii | isatty | iscntrl | iscons |
isdigit | isgraph | islower | isodigit | isprint | ispunct |
isspace | isupper | iswhite | isxdigit |
Each function in the is family tests a given integer value, returning a nonzero value if the integer satisfies the test condition and 0 if it does not. The ASCII character set is assumed.
The is functions and their test conditions are listed below:
Function |
Test Condition |
isalnum | Alphanumeric ('A'-'Z', 'a'-'z', or '0'-'9') |
isalpha | Letter ('A'-'Z' or 'a'-'z') |
isascii | ASCII character (0x00 - 0x7F) |
isatty | c is a device |
iscntrl | Control character (0x00 - 0x1F or 0x7F) |
iscons | c is the console device |
isdigit | Digit ('0'-'9') |
isgraph | Printable character except space (0x21 - 0x7E) |
islower | Lowercase letter ('a'-'z') |
isodigit | Octal digit ('0'-'7') |
isprint | Printable character (0x20 - 0x7E) |
ispunct | Punctuation character (all but alphanumeric and control characters) |
isspace | White-space character (0x09 - 0x0D or 0x20) |
isupper | Uppercase letter ('A'-'Z') |
iswhite | c <= 0x20, c >= 0x7F |
isxdigit | Hexadecimal digit ('A'-'F','a'-'f', or '0'-'9') |
The isascii routine produces meaningful results for all integer values. However, the remaining routines produce a defined result only for integer values corresponding to the ASCII character set (that is, only where isascii holds true).
Return Value