std::ctype_byname
is a std::ctype facet which encapsulates character classification rules of the locale specified at its construction.
The standard library is guaranteed to provide the following specializations:
std::ctype_byname<char> provides narrow character classification (uses table lookup for character classification) std::ctype_byname<wchar_t> provides wide character classification [edit] Nested types Type Definitionmask
typename std::ctype<CharT>::mask [edit] Member functions constructs a new ctype_byname
facet
ctype_byname
facet
Constructs a new std::ctype_byname
facet for a locale with name.
refs is used for resource management: if refs == 0, the implementation destroys the facet, when the last std::locale object holding it is destroyed. Otherwise, the object is not destroyed.
Parameters name - the name of the locale refs - the number of references that link to the facet std::ctype_byname::~ctype_bynameprotected:
~ctype_byname();
Destroys the facet.
Inherited from std::ctype<CharT> (only ifCharT
is not char) Nested types Type Definition char_type
CharT
Data members Member functions invokes do_is
std::ctype<CharT>
) [edit] invokes do_scan_is
std::ctype<CharT>
) [edit] invokes do_scan_not
std::ctype<CharT>
) [edit] invokes do_toupper
std::ctype<CharT>
) [edit] invokes do_tolower
std::ctype<CharT>
) [edit] invokes do_widen
std::ctype<CharT>
) [edit] invokes do_narrow
std::ctype<CharT>
) [edit] Protected member functions converts a character or characters to uppercase
std::ctype<CharT>
) [edit] converts a character or characters to lowercase
std::ctype<CharT>
) [edit] converts a character or characters from char to CharT
std::ctype<CharT>
) [edit] converts a character or characters from CharT
to char
std::ctype<CharT>
) [edit] classifies a character or a character sequence
std::ctype<CharT>
) [edit] locates the first character in a sequence that conforms to given classification
std::ctype<CharT>
) [edit] locates the first character in a sequence that fails given classification
std::ctype<CharT>
) [edit] Inherited from std::ctype<char> (only if CharT
is char) Nested types Type Definition char_type
char Data members Member Description std::locale::id id
[static] the identifier of the facet const std::size_t table_size
[static] size of the classification table, at least 256 Member functions obtains the character classification table
std::ctype<char>
) [edit] obtains the "C" locale character classification table
std::ctype<char>
) [edit] classifies a character or a character sequence, using the classification table
std::ctype<char>
) [edit] locates the first character in a sequence that conforms to given classification, using the classification table
std::ctype<char>
) [edit] locates the first character in a sequence that fails given classification, using the classification table
std::ctype<char>
) [edit] invokes do_toupper
std::ctype<CharT>
) [edit] invokes do_tolower
std::ctype<CharT>
) [edit] invokes do_widen
std::ctype<CharT>
) [edit] invokes do_narrow
std::ctype<CharT>
) [edit] Protected member functions converts a character or characters to uppercase
std::ctype<CharT>
) [edit] converts a character or characters to lowercase
std::ctype<CharT>
) [edit] converts a character or characters from char to CharT
std::ctype<CharT>
) [edit] converts a character or characters from CharT
to char
std::ctype<CharT>
) [edit] Inherited from std::ctype_base Nested types Type Definition mask
unspecified BitmaskType type (enumeration, integer type, or bitset) Member constants the value of mask
identifying whitespace character classification
mask
identifying printable character classification
mask
identifying control character classification
mask
identifying uppercase character classification
mask
identifying lowercase character classification
mask
identifying alphabetic character classification
mask
identifying digit character classification
mask
identifying punctuation character classification
mask
identifying hexadecimal digit character classification
mask
identifying blank character classification
std::ctype_byname<char> was incorrectly declared as an explicit specialization in the synopsis of <locale>, and the declaration was removed by the resolution of LWG issue 1298, but it remains a required specialization, just like std::ctype_byname<wchar_t>.
[edit] ExampleOutput:
isupper('Ã', C locale) returned false isupper('Ã', C locale with Unicode ctype) returned true[edit] Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior LWG 16 C++98 the definition of the explicit specialization std::ctype_byname<char>do_narrow
corrected LWG 616 C++98 the typename disambiguator was missing in the definition of mask
added [edit] See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4