C Programming/ctype.h/Function reference


isalnumEdit

PrototypeEdit

int isalnum(int c);

DescriptionEdit

This function tests whether the character c is of class alpha or digit in the current locale.

isalphaEdit

PrototypeEdit

int isalpha(int c);

DescriptionEdit

This function tests whether the character c is alphabetic in the current locale.

isblankEdit

PrototypeEdit

int isblank(int c);

DescriptionEdit

This function tests whether the character c is a space or a tab in the current locale.

iscntrlEdit

PrototypeEdit

int iscntrl(int c);

DescriptionEdit

This function returns true if c is a control character (that is, a character that is not a printing character).

isdigitEdit

PrototypeEdit

int isdigit(int c);

DescriptionEdit

This function returns true if c is a decimal digit ('0' through '9').

isgraphEdit

PrototypeEdit

int isgraph(int c);

DescriptionEdit

This function returns true if c is a character that has a glyph associated with it. Whitespace characters are not considered graphic.

islowerEdit

PrototypeEdit

int islower(int c);

DescriptionEdit

This function tests whether the character c is lowercase.

isprintEdit

PrototypeEdit

int isprint(int c);

DescriptionEdit

This function returns true if c is a printing character. Printing characters include all the graphic characters, plus the space character.

ispunctEdit

PrototypeEdit

int isalnum(int c);

DescriptionEdit

This function returns true if c is a punctuation character. This includes any printing character that is not alphanumeric or a space character.

isspaceEdit

PrototypeEdit

int isspace(int c);

DescriptionEdit

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

isupperEdit

PrototypeEdit

int isupper(int c);

DescriptionEdit

This function tests whether the character c is uppercase.

isxdigitEdit

PrototypeEdit

int isxdigit(int c);

DescriptionEdit

This function tests whether the character c is a hexadecimal dight ('0' through 'F').

tolowerEdit

PrototypeEdit

int tolower(int c);

DescriptionEdit

This function transliterates an uppercase character to lowercase and returns it. If c is not an uppercase letter, c is returned unchanged.

toupperEdit

PrototypeEdit

int toupper(int c);

DescriptionEdit

This function transliterates a lowercase character to uppercase and returns it. If c is not a lowercase letter, c is returned unchanged.