C++ Standard Library C++ STL Library

C++ - <cctype> (ctype.h)



The C++ has a number of functions that can be used to classify and transform individual characters. These functions are available to use in a current program after including the header file using - #include <cctype> or #include <ctype.h>. This header is part of the null-terminated byte strings library. All functions of this header file are listed below:

Library Functions

Character classification functions

FunctionsDescription
isalnum() Check if character is alphanumeric.
isalpha() Check if character is alphabetic.
isblank() (C++11) Check if character is blank.
iscntrl() Check if character is a control character.
isdigit() Check if character is decimal digit.
isgraph() Check if character has graphical representation.
islower() Check if character is lowercase letter.
isprint() Check if character is printable.
ispunct() Check if character is a punctuation character.
isspace() Check if character is a whitespace.
isupper() Check if character is uppercase letter.
isxdigit() Check if character is hexadecimal digit.

Character conversion functions

FunctionsDescription
tolower() Convert uppercase letter to lowercase.
toupper() Convert lowercase letter to uppercase.