C Programming/ctype.h/Function reference
isalnum
[edit | edit source]Prototype
[edit | edit source]int isalnum(int c);
Description
[edit | edit source]This function tests whether the character c is of class alpha or digit in the current locale.
isalpha
[edit | edit source]Prototype
[edit | edit source]int isalpha(int c);
Description
[edit | edit source]This function tests whether the character c is alphabetic in the current locale.
isblank
[edit | edit source]Prototype
[edit | edit source]int isblank(int c);
Description
[edit | edit source]This function tests whether the character c is a space or a tab in the current locale.
iscntrl
[edit | edit source]Prototype
[edit | edit source]int iscntrl(int c);
Description
[edit | edit source]This function returns true if c is a control character (that is, a character that is not a printing character).
isdigit
[edit | edit source]Prototype
[edit | edit source]int isdigit(int c);
Description
[edit | edit source]This function returns true if c is a decimal digit ('0' through '9').
isgraph
[edit | edit source]Prototype
[edit | edit source]int isgraph(int c);
Description
[edit | edit source]This function returns true if c is a character that has a glyph associated with it. Whitespace characters are not considered graphic.
islower
[edit | edit source]Prototype
[edit | edit source]int islower(int c);
Description
[edit | edit source]This function tests whether the character c is lowercase.
isprint
[edit | edit source]Prototype
[edit | edit source]int isprint(int c);
Description
[edit | edit source]This function returns true if c is a printing character. Printing characters include all the graphic characters, plus the space character.
ispunct
[edit | edit source]Prototype
[edit | edit source]int isalnum(int c);
Description
[edit | edit source]This function returns true if c is a punctuation character. This includes any printing character that is not alphanumeric or a space character.
isspace
[edit | edit source]Prototype
[edit | edit source]int isspace(int c);
Description
[edit | edit source]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
[edit | edit source]Prototype
[edit | edit source]int isupper(int c);
Description
[edit | edit source]This function tests whether the character c is uppercase.
isxdigit
[edit | edit source]Prototype
[edit | edit source]int isxdigit(int c);
Description
[edit | edit source]This function tests whether the character c is a hexadecimal dight ('0' through 'F').
tolower
[edit | edit source]Prototype
[edit | edit source]int tolower(int c);
Description
[edit | edit source]This function transliterates an uppercase character to lowercase and returns it. If c is not an uppercase letter, c is returned unchanged.
toupper
[edit | edit source]Prototype
[edit | edit source]int toupper(int c);
Description
[edit | edit source]This function transliterates a lowercase character to uppercase and returns it. If c is not a lowercase letter, c is returned unchanged.