Comment on page
ctype
The ctype library has functions to check if a character is part of a specific category of ASCII characters.
Checks if the given character
c
is a digit between '0' and '9'c
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn isdigit(char c);
Checks if the given character
c
is a hexadecimal digit between '0' and '9', A
and F
or a
and f
c
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn isxdigit(char c);
Checks if the given character
c
is a upper case letter between 'A' and 'Z'c
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn isupper(char c);
Checks if the given character
c
is a lower case letter between 'a' and 'z'c
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn islower(char c);
Checks if the given character
c
is either a upper or lower case letter between 'A' and 'Z' or 'a' and 'z'c
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn isalpha(char c);
Checks if the given character
c
is a upper or lower case letter or a numberc
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn isalnum(char c);
Checks if the given character
c
is a space characterc
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn isspace(char c);
Checks if the given character
c
is a invisible characterc
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn isblank(char c);
Checks if the given character
c
has a printable glyphc
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn isprint(char c);
Checks if the given character
c
is a control codec
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn iscntrl(char c);
Checks if the given character
c
has a visible glyphc
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn isgraph(char c);
Checks if the given character
c
is a punctuation characterc
: The character to checkreturn
: True ifc
is part of this range, false otherwise
fn ispunct(char c);
Last modified 8mo ago