Wednesday 25 July 2012

cctype Library

<cctype>


Character tests take a char c and return bool.
isalnum(c); // Is c a letter or digit?
isalpha(c); isdigit(c); // Is c a letter? Digit?
islower(c); isupper(c); // Is c lower case? Upper case?
isgraph(c); isprint(c); // Printing character except/including space?
isspace(c); iscntrl(c); // Is whitespace? Is a control character?
ispunct(c); // Is printing except space, letter, or digit?
isxdigit(c); // Is hexadecimal digit?
c=tolower(c); c=toupper(c); // Convert c to lower/upper case

No comments:

Post a Comment