std::ctype (3) - Linux Manuals
std::ctype: std::ctype
NAME
Synopsis
Defined in header <locale>
template< class CharT >
class ctype;
Class ctype encapsulates character classification features. All stream input operations performed through std::basic_istream<charT> use the std::ctype<charT> of the locale imbued in the stream to identify whitespace characters for input tokenization. Stream output operations apply std::ctype<charT>::widen() to narrow-character arguments prior to output.
std-ctype-inheritance.svg
Inheritance diagram
Two standalone (locale-independent) specializations are provided by the standard library:
Defined in header <locale>
std::ctype<char> provides narrow character equivalents of the minimal "C" locale classification. This specialization uses table lookup for character classification
std::ctype<wchar_t> provides wide character classification appropriate to the native character set
In addition, every locale object constructed in a C++ program implements its own (locale-specific) versions of these specializations.
Member types
Member type Definition
char_type CharT
Member functions
constructor (public member function)
destructor (protected member function)
is (public member function)
scan_is (public member function)
scan_not (public member function)
toupper (public member function)
tolower (public member function)
widen (public member function)
narrow (public member function)
Member objects
static std::locale::id id (public member object)
Protected member functions
do_is classifies a character or a character sequence
[virtual]
do_scan_is locates the first character in a sequence that conforms to given classification
[virtual]
do_scan_not locates the first character in a sequence that fails given classification
[virtual]
do_toupper converts a character or characters to uppercase
[virtual]
do_tolower converts a character or characters to lowercase
[virtual]
do_widen converts a character or characters from char to charT
[virtual]
do_narrow converts a character or characters from charT to char
[virtual]
Inherited from std::ctype_base
Member types
Type Definition
mask unspecified bitmask type (enumeration, integer type, or bitset)
Member constants
space the value of mask identifying whitespace character classification
[static]
print the value of mask identifying printable character classification