Appendix A

Commonly Used Character Handling Functions


Header Required: ctype.h


int isalnum (char);
Returns non-zero value if alphanumeric character is passed to function.

int isaplha (char);
Returns non-zero value if alphabetic character is passed to function.

int iscntrl (char);
Returns non-zero value if control character is passed to function.

int isdigit (char);
Returns non-zero value if digit character (0..9) is passed to function.

int isgraph (char);
Returns non-zero value if any printing character is passed to function.

int islower (char);
Returns non-zero value if lowercase character is passed to function.

int isprint (char);
Returns non-zero value if printable character is passed to function.

int ispunct (char);
Returns non-zero value if punctuation character is passed to function.

int isspace (char);
Returns non-zero value if any whitespace character is passed to function.

int isupper (char);
Returns non-zero value if uppercase character is passed to function.

char tolower (char);
Will return the lowercase equivalent of the character given to the function.

char toupper (char);
Will return the uppercase equivalent of the character given to the function.


home