std::regex_traits<CharT>::translate_nocase
类 | ||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
算法 | ||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
迭代器 | ||||
(C++11)
|
||||
(C++11)
|
||||
异常 | ||||
(C++11)
|
||||
特性 | ||||
(C++11)
|
||||
常量 | ||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
正则表达式文法 | ||||
(C++11)
|
成员函数 | ||||
regex_traits::translate_nocase
|
||||
CharT
translate_nocase(CharT
c)
const;
|
||
获得字符 c
的比较关键,使得感染的 locale 中,所有忽略大小写差异(若存在)后等价于此字符的所有字符产生相同关键。
正则表达式库需要匹配二个字符 c1
和 c2
,且标志 std::regex_constants::icase
为 true 时,它执行
regex_traits<>::translate_nocase(c1)
== regex_traits<>::translate_nocase(c2) 。
std::regex_traits
的标准库特化返回 std::use_facet<std::ctype<CharT>>(getloc()).tolower(c) ,即用当前感染的
locale 转换 c
为小写。
参数
c | - | 需要检验等价性的字符,忽略大小写 |
返回值
当前感染的本地环境中 c
的无关大小写的比较关键。
示例
本节未完成 原因:暂无示例 |