ctype Class
A class that provides a facet that is used to classify characters, convert from upper and lower cases, and convert between the native character set and that set used by the locale.
template <class CharType>
class ctype : public ctype_base;
Parameters
- CharType
The type used within a program to encode characters.
Remarks
As with any locale facet, the static object ID has an initial stored value of zero. The first attempt to access its stored value stores a unique positive value in id. Classification criteria are provided a nested bitmask type in the base class ctype_base.
The Standard C++ Library defines two explicit specializations of this template class:
ctype<char>, an explicit specialization whose differences are described separately.
ctype<wchar_t>, which treats elements as wide characters.
Other specializations of template class ctype<CharType>:
Convert a value ch of type CharType to a value of type char with the expression (char)ch.
Convert a value byte of type char to a value of type CharType with the expression CharType (byte).
All other operations are performed on char values in the same way as for the explicit specialization ctype<char>.
Constructors
Constructor for objects of class ctype that serve as locale facets for characters. |
Typedefs
A type that describes a character used by a locale. |
Member Functions
A virtual function called to test whether a single character has a particular attribute, or classify the attributes of each character in a range and stores them in an array. |
|
A virtual function called to convert a character of type CharType used by a locale to the corresponding character of type char in the native character set. |
|
A virtual function called to locate the first character in a range that matches a specified mask. |
|
A virtual function called to locate the first character in a range that does not match a specified mask. |
|
A virtual function called to convert a character or a range of characters to their lower case. |
|
A virtual function called to convert a character or a range of characters to upper case. |
|
A virtual function called to converts a character of type char in the native character set to the corresponding character of type CharType used by a locale. |
|
Tests whether a single character has a particular attribute, or classifies the attributes of each character in a range and stores them in an array. |
|
Converts a character of type CharType used by a locale to the corresponding character of type char in the native character set. |
|
Locates the first character in a range that matches a specified mask. |
|
Locates the first character in a range that does not match a specified mask. |
|
Converts a character or a range of characters to lower case. |
|
Converts a character or a range of characters to upper case. |
|
Converts a character of type char in the native character set to the corresponding character of type CharType used by a locale. |
Requirements
Header: <locale>
Namespace: std