C + + should be # include <cctype> c should be # include <ctype.h> The following functions are commonly used in the character library:
| Function name |
return value |
| Isalnum () |
If the argument is an alphanumeric character, that is, a letter or a number, the function returns True |
| Isalpha () |
If the argument is a letter, the function returns the True |
| Isblank () |
If the argument is a space or a horizontal tab, the function returns True |
| Iscntrl () |
If the argument is a control character, the function returns True |
| IsDigit () |
If the argument is a number (0~9), the function returns True |
| Isgraph () |
If the argument is a print character other than a space, the function returns True |
| Islower () |
If the argument is a lowercase letter, the function returns True |
| Isprint () |
If the argument is a print character (including a space), the function returns True |
| Ispunct () |
If the argument is a punctuation mark, the function returns True |
| Isspace () |
If the parameter is a standard white space character, such as a space, feed, line break, carriage return , horizontal tab, or Vertical tab, the function returns True |
| Isupper () |
If the argument is an uppercase letter, the function returns True |
| Isxdigit () |
If the argument is a hexadecimal number, that is 0~9, A~f, a~f, the function returns True |
| ToLower () |
If the argument is an uppercase character, it is returned in lowercase, otherwise the parameter is returned |
| ToUpper () |
If the argument is a lowercase letter, it is returned in uppercase, otherwise the parameter is returned |
Commonly used are: ToLower ()--toupper () Isupper ()--islower () Isalnum ()--isalpha () |