Character Handling <ctype.h>

Top  Previous  Next

The character testing functions described here are implemented as macros. They return a non-zero value if their argument meets the condition being tested and zero otherwise. The argument is a single integer.

 

Character Testing Functions

 


isalnum

determines if the argument is alpha-numeric


isalpha

determines if the argument is alphabetic


iscntrl

determines if the argument is an ASCII control character


isdigit

determines if the argument is a decimal digit


isgraph

determines if the argument is a printing character but not a space


islower

determines if the argument is a lower-case letter


isprint

determines if the argument is a printing character


ispunct

determines if the argument is a punctuation character


isspace

determines if the argument is a space, horizontal or vertical tab, carriage return, form-feed or newline


isupper

determines if the argument is an upper-case letter


isxdigit

determines if the argument is a hexadecimal digit

 

 

Character Mapping Functions

 


tolower

converts upper-case characters to lower case; returns other characters unchanged


toupper

converts lower-case characters to upper case; returns other characters unchanged