Difference between revisions of "cpp/locale"
From cppreference.com
< cpp
m (Shorten template names. Use {{lc}} where appropriate.) |
m (Update links.) |
||
Line 9: | Line 9: | ||
{{dsc h2 | Locales and facets }} | {{dsc h2 | Locales and facets }} | ||
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc locale}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc use_facet}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc has_facet}} |
{{dsc h2 | Character classification }} | {{dsc h2 | Character classification }} | ||
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc isspace}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc isblank}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc iscntrl}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc isupper}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc islower}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc isalpha}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc isdigit}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc ispunct}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc isxdigit}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc isalnum}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc isprint}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc isgraph}} |
{{dsc h2 | Character conversions }} | {{dsc h2 | Character conversions }} | ||
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc toupper}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc tolower}} |
{{dsc h2 | String and stream conversions }} | {{dsc h2 | String and stream conversions }} | ||
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc wstring_convert}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc wbuffer_convert}} |
{{dsc h2 | Facet category base classes }} | {{dsc h2 | Facet category base classes }} | ||
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc ctype_base}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc codecvt_base}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc messages_base}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc time_base}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc money_base}} |
{{dsc h2 | Facet categories }} | {{dsc h2 | Facet categories }} | ||
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc ctype}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc ctype_char}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc codecvt}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc collate}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc messages}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc time_get}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc time_put}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc num_get}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc num_put}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc numpunct}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc money_get}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc money_put}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc moneypunct}} |
{{dsc h2 | Locale-specific facet categories }} | {{dsc h2 | Locale-specific facet categories }} | ||
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc ctype_byname}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc ctype_byname_char}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc codecvt_byname}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc messages_byname}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc collate_byname}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc time_get_byname}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc time_put_byname}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc numpunct_byname}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc moneypunct_byname}} |
{{dsc end}} | {{dsc end}} | ||
Line 72: | Line 72: | ||
{{dsc begin}} | {{dsc begin}} | ||
{{dsc header | codecvt }} | {{dsc header | codecvt }} | ||
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc codecvt_utf8}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc codecvt_utf16}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc codecvt_utf8_utf16}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc codecvt_mode}} |
{{dsc end}} | {{dsc end}} | ||
Line 81: | Line 81: | ||
{{dsc begin}} | {{dsc begin}} | ||
{{dsc header | clocale }} | {{dsc header | clocale }} | ||
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc setlocale}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc LC_categories}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc localeconv}} |
− | {{dsc inc | cpp/locale/ | + | {{dsc inc | cpp/locale/dsc lconv}} |
{{dsc end}} | {{dsc end}} | ||
Revision as of 22:06, 31 May 2013
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 | |
set of polymorphic facets that encapsulate cultural differences (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) | |
(C++11) |
checks if a character is classified as a blank character 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 by a locale (function template) | |
checks if a character is classified as graphical 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)(deprecated in C++17)(removed in C++26) |
performs conversions between a wide string and a byte string (class template) |
(C++11)(deprecated in C++17)(removed in C++26) |
performs conversion between a byte stream buffer and a wide stream buffer (class template) |
Facet category base classes | |
defines character classification categories (class) | |
defines character conversion errors (class) | |
defines messages catalog type (class) | |
defines date format constants (class) | |
defines monetary formatting patterns (class) | |
Facet categories | |
defines character classification tables (class template) | |
specialization of std::ctype for type char (class template specialization) | |
converts between character encodings, including UTF-8, UTF-16, UTF-32 (class template) | |
defines lexicographical comparison and hashing of strings (class template) | |
implements retrieval of strings from message catalogs (class template) | |
parses time/date values from an input character sequence into std::tm (class template) | |
formats contents of std::tm for output as character sequence (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) | |
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 std::money_get and std::money_put (class template) | |
Locale-specific facet categories | |
represents the system-supplied std::ctype for the named locale (class template) | |
represents the system-supplied std::ctype<char> for the named locale (class template specialization) | |
represents the system-supplied std::codecvt for the named locale (class template) | |
represents the system-supplied std::messages for the named locale (class template) | |
represents the system-supplied std::collate for the named locale (class template) | |
represents the system-supplied std::time_get for the named locale (class template) | |
represents the system-supplied std::time_put for the named locale (class template) | |
represents the system-supplied std::numpunct for the named locale (class template) | |
represents the system-supplied std::moneypunct for the named locale (class template) |
Locale-independent unicode conversion facets
Defined in header
<codecvt> | |
(C++11)(deprecated in C++17)(removed in C++26) |
converts between UTF-8 and UCS-2/UCS-4 (class template) |
(C++11)(deprecated in C++17)(removed in C++26) |
converts between UTF-16 and UCS-2/UCS-4 (class template) |
(C++11)(deprecated in C++17)(removed in C++26) |
converts between UTF-8 and UTF-16 (class template) |
(C++11)(deprecated in C++17)(removed in C++26) |
tags to alter behavior of the standard codecvt facets (enum) |
C library locales
Defined in header
<clocale> | |
gets and sets the current C locale (function) | |
locale categories for std::setlocale (macro constant) | |
queries numeric and monetary formatting details of the current locale (function) | |
formatting details, returned by std::localeconv (class) |