std::ctype_byname<char>
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <locale>
|
||
| template<> class ctype_byname : public std::ctype<char>; |
||
这种专业化的std::ctype_byname封装类型char的字符分类功能。喜欢它的基类
std::ctype<char>与通用std::ctype_byname,表查找,分类字符Original:
This specialization of std::ctype_byname encapsulates character classification features for type char. Like its base class
std::ctype<char> and unlike general-purpose std::ctype_byname, table lookup is used to classify charactersThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目录 |
[编辑] 会员类型
| 会员类型
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
mask
|
ctype<char>::mask
|
[编辑] 成员函数
| 构造一个新的ctype_byname <Char>来方面 Original: constructs a new ctype_byname<char> facet The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
| 解构一个ctype_byname <Char>来方面 Original: destructs a ctype_byname<char> facet The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) | |
Inherited from std::ctype<char>
Member types
| 会员类型
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
char
|
Member objects
| 会员名称
Original: Member name The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Type |
id (静态的)
|
std::locale::id |
table_size (静态常量)
|
std::size_t大小的分类表,至少256
Original: std::size_t size of the classification table, at least 256 The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Member functions
| 得到的字符分类表 Original: obtains the character classification table The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ctype<char>)
| |
| [静态的] </ SPAN></div></div>
|
获得“C”区域设置字符分类表 Original: obtains the "C" locale character classification table The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员函数of std::ctype<char>)
|
| 分类的字符或字符序列时,使用的分类表 Original: classifies a character or a character sequence, using the classification table The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ctype<char>)
| |
| 找到的第一个字符序列中符合给定的分类,使用的分类表 Original: locates the first character in a sequence that conforms to given classification, using the classification table The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ctype<char>)
| |
| locates the first character in a sequence that fails given classification, using the classification table (公共成员函数of std::ctype<char>)
| |
| 调用 do_toupper Original: invokes do_toupper The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ctype)
| |
| 调用 do_tolowerOriginal: invokes do_tolowerThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ctype)
| |
| 调用 do_widen Original: invokes do_widen The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ctype)
| |
| 调用 do_narrow Original: invokes do_narrow The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ctype)
| |
Protected member functions
| [虚拟的] </ SPAN></div></div>
|
将一个或多个字符转换为大写 Original: converts a character or characters to uppercase The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::ctype)
|
| [虚拟的] </ SPAN></div></div>
|
一个或多个字符转换为小写 Original: converts a character or characters to lowercase The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::ctype)
|
| [虚拟的] </ SPAN></div></div>
|
将一个或多个字符从 charcharT Original: converts a character or characters from char to charT The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::ctype)
|
| [虚拟的] </ SPAN></div></div>
|
将一个或多个字符从 charTchar Original: converts a character or characters from charT to char The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::ctype)
|
</div>
Inherited from std::ctype_base
Member types
| 类型
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
mask
|
未指定的位掩码类型(枚举,整数类型,或bitset的)
Original: unspecified bitmask type (enumeration, integer type, or bitset) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Member constants
| space [静态的] </ SPAN></div></div>
|
mask识别的空白字符分类 Original: the value of mask identifying whitespace character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| print [静态的] </ SPAN></div></div>
|
mask确定可打印字符分类的价值 Original: the value of mask identifying printable character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| cntrl [静态的] </ SPAN></div></div>
|
mask识别控制字符分类 Original: the value of mask identifying control character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| upper [静态的] </ SPAN></div></div>
|
mask确定的价值大写字符分类 Original: the value of mask identifying uppercase character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| lower [静态的] </ SPAN></div></div>
|
值 mask识别小写字母分类 Original: the value of mask identifying lowercase character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| alpha [静态的] </ SPAN></div></div>
|
mask识别英文字母分类的价值 Original: the value of mask identifying alphabetic character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| digit [静态的] </ SPAN></div></div>
|
mask识别数字字符分类的价值 Original: the value of mask identifying digit character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| punct [静态的] </ SPAN></div></div>
|
mask识别的标点字符分类 Original: the value of mask identifying punctuation character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| xdigit [静态的] </ SPAN></div></div>
|
mask识别十六进制数字字符分类的价值 Original: the value of mask identifying hexadecimal digit character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| blank [静态的] </ SPAN> (C++11)</div></div>
|
mask识别空白字符分类的价值 Original: the value of mask identifying blank character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
| alnum [静态的] </ SPAN></div></div>
|
alpha | digit (公共静态成员常量) |
| graph [静态的] </ SPAN></div></div>
|
alnum | punct (公共静态成员常量) |
</div>
[编辑] 为例
#include <iostream> #include <locale> int main() { char c = '\xde'; // capital letter thorn std::locale loc("C"); std::cout << "isupper('Þ', C locale) returned " << std::boolalpha << std::isupper(c, loc) << '\n'; loc = std::locale(loc, new std::ctype_byname<char>("en_US.utf8")); std::cout << "isupper('Þ', C locale with Unicode ctype<char>) returned " << std::boolalpha << std::isupper(c, loc) << '\n'; loc = std::locale(loc, new std::ctype_byname<char>("is_IS.iso88591")); std::cout << "isupper('Þ', C locale with Islandic ctype<char>) returned " << std::boolalpha << std::isupper(c, loc) << '\n'; }
Output:
isupper('Þ', C locale) returned false
isupper('Þ', C locale with Unicode ctype<char>) returned false
isupper('Þ', C locale with Islandic ctype<char>) returned true[编辑] 另请参阅
| 定义字符分类表 Original: defines character classification tables The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) | |
| 专业化的类型std::ctypechar Original: specialization of std::ctype for type char The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板专业化) | |