Difference between revisions of "cpp/locale"
From cppreference.com
< cpp
m (other c++11's) |
|||
Line 52: | Line 52: | ||
{{dcl list begin}} | {{dcl list begin}} | ||
{{dcl list header | codecvt }} | {{dcl list header | codecvt }} | ||
− | {{dcl list tclass | cpp/locale/codecvt_utf8 | converts between UTF8 and UCS2/UCS4 | notes={{mark c++11 | + | {{dcl list tclass | cpp/locale/codecvt_utf8 | converts between UTF8 and UCS2/UCS4 | notes={{mark c++11}}}} |
− | {{dcl list tclass | cpp/locale/codecvt_utf16 | converts between UTF16 and UCS2/UCS4 | notes={{mark c++11 | + | {{dcl list tclass | cpp/locale/codecvt_utf16 | converts between UTF16 and UCS2/UCS4 | notes={{mark c++11}}}} |
− | {{dcl list tclass | cpp/locale/codecvt_utf8_utf16 | converts between UTF8 and UTF16 | notes={{mark c++11 | + | {{dcl list tclass | cpp/locale/codecvt_utf8_utf16 | converts between UTF8 and UTF16 | notes={{mark c++11}}}} |
− | {{dcl list class | cpp/locale/codecvt_mode | tags to alter behavior of the standard codecvt facets| notes={{mark c++11 | + | {{dcl list class | cpp/locale/codecvt_mode | tags to alter behavior of the standard codecvt facets| notes={{mark c++11}}}} |
{{dcl list end}} | {{dcl list end}} | ||
Revision as of 02:10, 14 September 2011
The locale facility includes internationalization support for character classification and string collation, numeric, monetary, and date/time formatting and parsing, and message retrieval. Locale settings control the behavior of stream I/O, regular expression library, and other components of the C++ standard library.
Contents |
Locales
Defined in header
<locale> | |
Locales and facets | |
polymorphic set of facets that comprise a locale (class) | |
obtains a facet from a locale (function template) | |
checks if a locale implements a specific facet (function template) | |
Character classification | |
checks if a character is classified as whitespace by a locale (function template) | |
checks if a character is classified as a control character by a locale (function template) | |
checks if a character is classified as uppercase by a locale (function template) | |
checks if a character is classified as lowercase by a locale (function template) | |
checks if a character is classified as alphabetic by a locale (function template) | |
checks if a character is classified as a digit by a locale (function template) | |
checks if a character is classified as punctuation by a locale (function template) | |
checks if a character is classified as a hexadecimal digit by a locale (function template) | |
checks if a character is classified as alphanumeric by a locale (function template) | |
checks if a character is classified as printable, including space, by a locale (function template) | |
checks if a character is classfied as printable, excluding space, by a locale (function template) | |
Character conversions | |
converts a character to uppercase using the ctype facet of a locale (function template) | |
converts a character to lowercase using the ctype facet of a locale (function template) | |
String and stream conversions | |
(C++11) |
performs conversions between a wide string and a byte string (class template) |
(C++11) |
performs conversion between a byte stream buffer and a wide stream buffer (class template) |
Facet categories | |
defines character classification tables (class template) | |
converts between character encodings, including multibyte and wide (class template) | |
parses numeric values from an input character sequence (class template) | |
formats numeric values for output as character sequence (class template) | |
defines numeric punctuation rules (class template) | |
defines lexicographical comparison and hashing of strings (class template) | |
parses time/date values from an input character sequence into Template:cpp (class template) | |
formats contents of Template:cpp for output as character sequence (class template) | |
parses and constructs a monetary value from an input character sequence (class template) | |
formats a monetary value for output as a character sequence (class template) | |
defines monetary formatting parameters used by Template:cpp and Template:cpp (class template) | |
implements retrieval of strings from message catalogs (class) |
Standard code conversion facets
Defined in header
<codecvt> | |
(C++11) |
converts between UTF8 and UCS2/UCS4 (class template) |
(C++11) |
converts between UTF16 and UCS2/UCS4 (class template) |
(C++11) |
converts between UTF8 and UTF16 (class template) |
(C++11) |
tags to alter behavior of the standard codecvt facets (class) |
C library locales
Defined in header
<clocale> | |
full locale category for Template:cpp (macro constant) | |
string comparison locale category for Template:cpp (macro constant) | |
character classification locale category for Template:cpp (macro constant) | |
monetary formatting locale category for Template:cpp (macro constant) | |
nonmonetary numeric formatting locale category for Template:cpp (macro constant) | |
time formatting locale category for Template:cpp (macro constant) | |
queries numeric and monetary formatting details of the current locale (function) | |
formatting details, returned by Template:cpp (class) |