Localization library
来自cppreference.com
< cpp
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
语言环境的设施包括字符分类和字符串排序,数字,货币,日期/时间格式和语法分析,信息检索的国际化支持。区域设置控制流I / O,正则表达式库,和其他组件的C + +标准库的行为.
原文:
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.
[编辑] 语言环境
在头文件
<locale> 中定义 | |
| |
多态的文化差异方面的封装 原文: set of polymorphic facets that encapsulate cultural differences (类) | |
得到的语言环境的一个方面 (函数模板) | |
检查如果一个语言环境中实现一个特定的方面 原文: checks if a locale implements a specific facet (函数模板) | |
| |
检查,如果被归类为空白字符的语言环境 原文: checks if a character is classified as whitespace by a locale (函数模板) | |
(C++11) |
checks if a character is classified as a blank character by a locale (函数模板) |
如果一个字符被列为检查的控制字符的语言环境 原文: checks if a character is classified as a control character by a locale (函数模板) | |
检查,如果一个字符被归类为大写字母的语言环境 原文: checks if a character is classified as uppercase by a locale (函数模板) | |
检查,如果一个字符被归类为小写的语言环境 原文: checks if a character is classified as lowercase by a locale (函数模板) | |
如果一个字符被列为检查的区域设置,按字母顺序排列 原文: checks if a character is classified as alphabetic by a locale (函数模板) | |
检查,如果一个字符被归类为一个数字的语言环境 原文: checks if a character is classified as a digit by a locale (函数模板) | |
如果一个字符被列为检查标点符号的语言环境 原文: checks if a character is classified as punctuation by a locale (函数模板) | |
检查,如果一个字符被归类为一个十六进制数字的语言环境 原文: checks if a character is classified as a hexadecimal digit by a locale (函数模板) | |
被列为检查,如果一个字符的字母数字的语言环境 原文: checks if a character is classified as alphanumeric by a locale (函数模板) | |
检查,如果一个字符被归为可打印的语言环境 原文: checks if a character is classified as printable by a locale (函数模板) | |
如果一个字符的检查点分类为图形的语言环境 原文: checks if a character is classfied as graphical by a locale (函数模板) | |
| |
字符转换为大写的语言环境使用的CTYPE方面的 原文: converts a character to uppercase using the ctype facet of a locale (函数模板) | |
converts a character to lowercase using the ctype facet of a locale (函数模板) | |
| |
(C++11) |
宽字符串和字节字符串之间进行转换 原文: performs conversions between a wide string and a byte string (类模板) |
(C++11) |
一个字节的数据流缓存器和一个宽的流缓存器之间执行转换 原文: performs conversion between a byte stream buffer and a wide stream buffer (类模板) |
| |
定义字符分类 原文: defines character classification categories (类) | |
定义字符转换错误 原文: defines character conversion errors (类) | |
定义消息目录式 (类) | |
定义日期格式常数 (类) | |
定义货币的格式化模式 原文: defines monetary formatting patterns (类) | |
| |
定义字符分类表 原文: defines character classification tables (类模板) | |
专业化的类型std::ctypechar 原文: specialization of std::ctype for type char (类模板特化) | |
之间进行转换的字符编码,包括UTF-8,UTF-16,UTF-32 原文: converts between character encodings, including UTF-8, UTF-16, UTF-32 (类模板) | |
定义逐一比较和散列字符串 原文: defines lexicographical comparison and hashing of strings (类模板) | |
实现字符串消息目录的检索 原文: implements retrieval of strings from message catalogs (类模板) | |
解析输入字符序列分解成struct std::tm的时间/日期值 原文: parses time/date values from an input character sequence into struct std::tm (类模板) | |
(类模板) | |
parses numeric values from an input character sequence (类模板) | |
格式数字输出的字符序列的值 原文: formats numeric values for output as character sequence (类模板) | |
定义数字标点规则 (类模板) | |
解析和构造的货币价值,从一个输入字符序列 原文: parses and constructs a monetary value from an input character sequence (类模板) | |
输出一个字符序列格式的货币价值 原文: formats a monetary value for output as a character sequence (类模板) | |
定义货币格式std::money_get和std::money_put使用的参数 原文: defines monetary formatting parameters used by std::money_get and std::money_put (类模板) | |
| |
代表系统提供std::ctype命名的语言环境 原文: represents the system-supplied std::ctype for the named locale (类模板) | |
代表系统提供std::ctype<char>命名的语言环境 原文: represents the system-supplied std::ctype<char> for the named locale (类模板特化) | |
代表系统提供std::codecvt命名的语言环境 原文: represents the system-supplied std::codecvt for the named locale (类模板) | |
代表系统提供std::messages命名的语言环境 原文: represents the system-supplied std::messages for the named locale (类模板) | |
代表系统提供std::collate命名的语言环境 原文: represents the system-supplied std::collate for the named locale (类模板) | |
代表系统提供std::time_get命名的语言环境 原文: represents the system-supplied std::time_get for the named locale (类模板) | |
代表系统提供std::time_put命名的语言环境 原文: represents the system-supplied std::time_put for the named locale (类模板) | |
代表系统提供std::numpunct命名的语言环境 原文: represents the system-supplied std::numpunct for the named locale (类模板) | |
代表系统提供std::moneypunct命名的语言环境 原文: represents the system-supplied std::moneypunct for the named locale (类模板) |
[编辑] 独立于语言环境的Unicode转换方面
在头文件
<codecvt> 中定义 | |
(C++11) |
之间的转换UTF-8和UCS2/UCS4 原文: converts between UTF-8 and UCS2/UCS4 (类模板) |
(C++11) |
之间的转换UTF-16和UCS2/UCS4 原文: converts between UTF-16 and UCS2/UCS4 (类模板) |
(C++11) |
converts between UTF-8 and UTF-16 (类模板) |
(C++11) |
标签改变的的标准codecvt方面的行为 原文: tags to alter behavior of the standard codecvt facets (类) |
[编辑] C库的语言环境
在头文件
<clocale> 中定义 | |
获取和设置当前的C语言环境 (函数) | |
std::setlocale的语言环境类别 原文: locale categories for std::setlocale (常量宏) | |
查询当前语言环境的数字和货币格式的详细信息 原文: queries numeric and monetary formatting details of the current locale (函数) | |
格式的详细信息,返回std::localeconv 原文: formatting details, returned by std::localeconv (类) |