std.ctype
Simple ASCII character classification functions. For Unicode classification, see
std.uni
.
References:
ASCII Table
,
Wikipedia
Variables
_ALP
:
_BLK
:
_CTL
:
_DIG
:
_HEX
:
_LC
:
_PNC
:
_SPC
:
_UC
:
Functions
int
isalnum
(
dchar
c
)
Returns !=0 if c is a letter in the range (0..9, a..z, A..Z).
int
isalpha
(
dchar
c
)
Returns !=0 if c is an ascii upper or lower case letter.
int
isascii
(
dchar
c
)
Returns !=0 if c is in the ascii character set, i.e. in the range 0..0x7F.
int
iscntrl
(
dchar
c
)
Returns !=0 if c is a control character.
int
isdigit
(
dchar
c
)
Returns !=0 if c is a digit.
int
isgraph
(
dchar
c
)
Returns !=0 if c is a printing character except for the space character.
int
islower
(
dchar
c
)
Returns !=0 if c is lower case ascii letter.
int
isprint
(
dchar
c
)
Returns !=0 if c is a printing character including the space character.
int
ispunct
(
dchar
c
)
Returns !=0 if c is a punctuation character.
int
isspace
(
dchar
c
)
Returns !=0 if c is a space, tab, vertical tab, form feed, carriage return, or linefeed.
int
isupper
(
dchar
c
)
Returns !=0 if c is an upper case ascii character.
int
isxdigit
(
dchar
c
)
Returns !=0 if c is a hex digit (0..9, a..f, A..F).
dchar
tolower
(
dchar
c
)
If c is an upper case ascii character, return the lower case equivalent, otherwise return c.
dchar
toupper
(
dchar
c
)
If c is a lower case ascii character, return the upper case equivalent, otherwise return c.