4.0 KiB
ctype.h - Classification of ASCII characters
Function declarations:
- isalnum
- isalpha
- isblank
- iscntrl
- isdigit
- isgraph
- islower
- isprint
- ispunct
- isspace
- isupper
- isxdigit
- tolower
- toupper
isalnum
Description
Function checks whether given integer is an ASCII code representing a letter or a digit. These characters are lowercase letters ('a'..'z'), uppercase letters ('A'..'Z') and digits ('0'..'9').
Declaration
int isalnum(int c);
isalpha
Description
Function checks whether given integer is an ASCII code representing a letter. These characters are lowercase letters ('a'..'z') and uppercase letters.
Declaration
int isalpha(int c);
isblank
Description
Checks whether a character is a space (' ') or a horizontal tab ('\t')
Declaration
int isblank(int c);
iscntrl
Description
Checks whether a character is a control character ('\x00' through '\x1f' and '\x7f').
Declaration
int iscntrl(int c);
isdigit
Description
Checks whether a character is a digit ('0' through '9')
Declaration
int isdigit(int c);
isxdigit
Description
Checks whether a character is a hexadecimal digit ('0' through '9', 'a' through 'f' or 'A' through 'F')
Declaration
int isxdigit(int c);
isgraph
Description
Checks whether a character is a
- Number;
- Letter;
- or punctuation
Declaration
int isgraph(int c);
islower
Description
Checks whether a character is a lowercase letter ('a' through 'z')
Declaration
int islower(int c);
isupper
Description
Checks whether a character is a uppercase letter ('A' through 'Z')
Declaration
int islower(int c);
isprint
Description
Checks whether a character is a
- Number;
- Letter;
- Space;
- or punctuation
Declaration
int isprint(int c);
ispunct
Description
Checks whether a character is a punctuation character (one of !"#$%&'()*+,-./:;<=>?@[\]^_{|}~
or backtick).
Declaration
int ispunct(int c);
isspace
Description
Function checks whether given integer is a whitespace character. These characters include whitespace (' '), form feed ('\f'), line feed ('\n'), carriage return ('\r'), horizontal and vertical tab ('\t' and '\v').
Declaration
int isspace(int c);
tolower
Description
If the character is an uppercase letter returns lowercase version of it. Otherwise returns the character unmodified.
Declaration
int tolower(int c);
toupper
Description
If the character is an lowercase letter returns uppercase version of it. Otherwise returns the character unmodified.
Declaration
int toupper(int c);