In c ++, it should be # include <cctype> In c, it should be # include <ctype. h> The following are common functions in the character function library:
Function Name |
Return Value |
Isalnum () |
If the parameter is a letter or number, this function returns true. |
Isalpha () |
If the parameter is a letter, this function returns true |
Isblank () |
If the parameter is a space or horizontal tab, this function returns true. |
Iscntrl () |
If the parameter is a control character, this function returns true |
Isdigit () |
If the parameter is a number (0 ~ 9). This function returns true. |
Isgraph () |
If the parameter is a print character other than space, this function returns true |
Islower () |
If the parameter is a lowercase letter, this function returns true. |
Isprint () |
If the parameter is a print character (including spaces), this function returns true |
Ispunct () |
If the parameter is a punctuation mark, this function returns true. |
Isspace () |
If the parameter is a standard blank character, such as space, paper feed, line feed, and carriage return , Horizontal or vertical tab, this function returns true |
Isupper () |
If the parameter is an uppercase letter, this function returns true. |
Isxdigit () |
If the parameter is a hexadecimal number, that is, 0 ~ 9. ~ F, ~ F. This function returns true. |
Tolower () |
If the parameter is an uppercase character, it is returned in lower case; otherwise, this parameter is returned. |
Toupper () |
If the parameter is a lowercase letter, it is returned in uppercase; otherwise, this parameter is returned. |
Commonly used: Tolower () -- toupper () Isupper () -- islower () Isalnum () -- isalpha () |