isalnum(), isalpha(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), and isxdigit()

Syntax
  #include <ctype.h>

  
  int isalnum (int ch);

  
  int isalpha (int ch);

  
  ...

  
  int isxdigit(int ch);

  
Description

These functions determine whether character ch belongs to a certain set of characters. The next table describes the character ranges tested by the functions.

Table 1. Testing Functions Character Range
Function ch Test Range
isalnum() Alphanumeric character ( A-Z, a-z, or 0-9)
isalpha() Alphabetic character ( A-Z or a-z)
iscntrl() Control character ( \000-\037 or \177 (DEL))
isdigit() Decimal digit ( 0-9)
isgraph() Printable character except space ( !-~)
islower() Lower case letter ( a-z)
isprint() Printable character ( ' '-~)
ispunct() Punctuation character ( !-/, :-@, [-' and {-~)
isspace() White space character ( ' ', \f, \n, \r, \t and \v)
isupper() Upper case letter ( A-Z)
isxdigit() Hexadecimal digit ( 0-9, A-F or a-f)
Return

TRUE ( 1), if ch is in the character class; 0 otherwise.

See also

tolower()

toupper()