Difference between revisions of "cpp/locale"
From cppreference.com
< cpp
m (1 revision: import content) |
(Should there be a See Also between character classification here and character classification of cpp/string/narrow and cpp/string/wide ?) |
||
Line 2: | Line 2: | ||
{{cpp/locale/sidebar}} | {{cpp/locale/sidebar}} | ||
− | + | === Locales === | |
− | + | {{dcl list begin}} | |
− | + | {{dcl list header | locale }} | |
+ | {{dcl list h2 | locales and facets }} | ||
+ | {{dcl list class | cpp/locale/locale | polymorphic set of facets that comprise a locale }} | ||
+ | {{dcl list tfun | cpp/locale/use_facet | obtains a facet from a locale }} | ||
+ | {{dcl list tfun | cpp/locale/has_facet | checks if a locale implements a specific facet }} | ||
+ | {{dcl list h2 | character classification }} | ||
+ | {{dcl list tfun | cpp/locale/isspace | checks if a character is classified as whitespace by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/iscntrl | checks if a character is classified as a control character by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/isupper | checks if a character is classified as uppercase by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/islower | checks if a character is classified as lowercase by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/isalpha | checks if a character is classified as alphabetic by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/isdigit | checks if a character is classified as a digit by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/ispunct | checks if a character is classified as punctuation by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/isxdigit | checks if a character is classified as a hexadecimal digit by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/isalnum | checks if a character is classified as alphanumeric by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/isprint | checks if a character is classified as printable, including space, by a locale}} | ||
+ | {{dcl list tfun | cpp/locale/isgraph | checks if a character is classfied as printable, excluding space, by a locale}} | ||
+ | {{dcl list h2 | character conversions }} | ||
+ | {{dcl list tfun | cpp/locale/toupper | converts a character to uppercase using the ctype facet of a locale}} | ||
+ | {{dcl list tfun | cpp/locale/tolower | converts a character to lowercase using the ctype facet of a locale}} | ||
+ | {{dcl list h2 | string and stream conversions }} | ||
+ | {{dcl list tclass | cpp/locale/wstring_convert | performs conversions between a wide string and a byte string | notes={{mark c++11 feature}} }} | ||
+ | {{dcl list tclass | cpp/locale/wbuffer_convert | performs conversion between a byte stream buffer and a wide stream buffer | notes={{mark c++11 feature}}}} | ||
+ | {{dcl list h2 | facet categories }} | ||
+ | {{dcl list tclass | cpp/locale/ctype | title=ctype_base<br>ctype<br>ctype_byname | defines character classification tables}} | ||
+ | {{dcl list tclass | cpp/locale/codecvt | title=codecvt_base<br>codecvt<br>codecvt_byname | converts between character encodings, including multibyte and wide}} | ||
+ | {{dcl list tclass | cpp/locale/num_get | parses numeric values from an input character sequence}} | ||
+ | {{dcl list tclass | cpp/locale/num_put | formats numeric values for output as character sequence}} | ||
+ | {{dcl list tclass | cpp/locale/numpunct | title=numpunct<br>numpunct_byname| defines numeric punctuation rules}} | ||
+ | {{dcl list tclass | cpp/locale/collate | title=collate<br>collate_byname | defines lexicographical comparison and hashing of strings}} | ||
+ | {{dcl list tclass | cpp/locale/time_get | title=time_base<br>time_get<br>time_get_byname | parses time/date values from an input character sequence into {{cpp|struct std::tm}}}} | ||
+ | {{dcl list tclass | cpp/locale/time_put | title=time_put<br>time_put_byname | formats contents of {{cpp|struct std::tm}} for output as character sequence}} | ||
+ | {{dcl list tclass | cpp/locale/money_get | parses and constructs a monetary value from an input character sequence}} | ||
+ | {{dcl list tclass | cpp/locale/money_put | formats a monetary value for output as a character sequence }} | ||
+ | {{dcl list tclass | cpp/locale/moneypunct | title=money_base<br>moneypunct<br>moneypunct_byname | defines monetary formatting parameters used by {{cpp|std::money_get}} and {{cpp|std::money_put}} }} | ||
+ | {{dcl list class | cpp/locale/messages_base | title=messages_base<br>messages<br>messages_byname | implements retrieval of strings from message catalogs}} | ||
+ | {{dcl list end}} | ||
+ | |||
+ | === Standard code conversion facets === | ||
+ | {{dcl list begin}} | ||
+ | {{dcl list header | codecvt }} | ||
+ | {{dcl list tclass | cpp/locale/codecvt_utf8 | converts between UTF8 and UCS2/UCS4 | notes={{mark c++11 feature}}}} | ||
+ | {{dcl list tclass | cpp/locale/codecvt_utf16 | converts between UTF16 and UCS2/UCS4 | notes={{mark c++11 feature}}}} | ||
+ | {{dcl list tclass | cpp/locale/codecvt_utf8_utf16 | converts between UTF8 and UTF16 | notes={{mark c++11 feature}}}} | ||
+ | {{dcl list class | cpp/locale/codecvt_mode | tags to alter behavior of the standard codecvt facets| notes={{mark c++11 feature}}}} | ||
+ | {{dcl list end}} | ||
+ | === C library locales === | ||
{{dcl list begin}} | {{dcl list begin}} | ||
+ | {{dcl list header | clocale }} | ||
{{dcl list template | cpp/locale/dcl list setlocale}} | {{dcl list template | cpp/locale/dcl list setlocale}} | ||
+ | {{dcl list macro const | cpp/locale/LC_ALL | full locale category for {{cpp|std::setlocale}}}} | ||
+ | {{dcl list macro const | cpp/locale/LC_COLLATE | string comparison locale category for {{cpp|std::setlocale}}}} | ||
+ | {{dcl list macro const | cpp/locale/LC_CTYPE | character classification locale category for {{cpp|std::setlocale}}}} | ||
+ | {{dcl list macro const | cpp/locale/LC_MONETARY | monetary formatting locale category for {{cpp|std::setlocale}}}} | ||
+ | {{dcl list macro const | cpp/locale/LC_NUMERIC | nonmonetary numeric formatting locale category for {{cpp|std::setlocale}}}} | ||
+ | {{dcl list macro const | cpp/locale/LC_TIME | time formatting locale category for {{cpp|std::setlocale}}}} | ||
+ | {{dcl list fun | cpp/types/localeconv | queries numeric and monetary formatting details of the current locale}} | ||
+ | {{dcl list class | cpp/types/lconv | formatting details, returned by {{cpp|std::localeconv}} }} | ||
{{dcl list end}} | {{dcl list end}} |
Revision as of 19:18, 13 September 2011
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 | |
performs conversions between a wide string and a byte string (class template) | |
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> | |
converts between UTF8 and UCS2/UCS4 (class template) | |
converts between UTF16 and UCS2/UCS4 (class template) | |
converts between UTF8 and UTF16 (class template) | |
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) |