411 REFERENCE · Wikibooks
C programming/ctype.h/Function reference
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
__NOTOC__
isalnum
Prototype
int isalnum(int c);
Description
This function tests whether the character c is of class alpha or digit in the current locale.
isalpha
Prototype
int isalpha(int c);
Description
This function tests whether the character c is alphabetic in the current locale.
isblank
Prototype
int isblank(int c);
Description
This function tests whether the character c is a space or a tab in the current locale.
iscntrl
Prototype
int iscntrl(int c);
Description
This function returns true if c is a control character (that is, a character that is not a printing character).
isdigit
Prototype
int isdigit(int c);
Description
This function returns true if c is a decimal digit ('0' through '9').
isgraph
Prototype
int isgraph(int c);
Description
This function returns true if c is a character that has a glyph associated with it. Whitespace characters are not considered graphic.
islower
Prototype
int islower(int c);
Description
This function tests whether the character c is lowercase.
isprint
Prototype
int isprint(int c);
Description
This function returns true if c is a printing character. Printing characters include all the graphic characters, plus the space character.
ispunct
Prototype
int isalnum(int c);
Description
This function returns true if c is a punctuation character. This includes any printing character that is not alphanumeric or a space character.
isspace
Prototype
int isspace(int c);
Description
Returns true if c is a whitespace character. In the standard C locale, these are the valid space characters:
Spaces
Horizontal tabs
Vertical tabs
Newlines
Formfeeds
Carriage returns
isupper
Prototype
int isupper(int c);
Description
This function tests whether the character c is uppercase.
isxdigit
Prototype
int isxdigit(int c);
Description
This function tests whether the character c is a hexadecimal dight ('0' through 'F').
tolower
Prototype
int tolower(int c);
Description
This function transliterates an uppercase character to lowercase and returns it. If c is not an uppercase letter, c is returned unchanged.
toupper
Prototype
int toupper(int c);
Description
This function transliterates a lowercase character to uppercase and returns it. If c is not a lowercase letter, c is returned unchanged.