std::regex_traits::transform
来自cppreference.com
< cpp | regex | regex traits
![]() |
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
template< class ForwardIt > string_type transform( ForwardIt first, ForwardIt last) const |
||
[first, last)
,例如,如果一个排序键比另一种键与operator<比较少,那么第一个排序键的字符序列来之前的字符序列,产生了第二个排序关键字,在目前取得的排序关键字的字符序列充满语言环境的整理秩序原文:
Obtains the sort key for the character sequence
[first, last)
, such that if a sort key compares less than another sort key with operator<, then the character sequence that produced the first sort key comes before the character sequence that produced the second sort key, in the currently imbued locale's collation order.例如,当正则表达式的标志std::regex_constants::collate设置,然后将匹配字符序列
[a-b]
c1
traits.transform("a") <= traits.transform(c1) <= traits.transform("b")。请注意,该函数接受一个字符序列作为参数,以适应像[[.ae.]-d]定义的范围.....原文:
For example when the regex flag std::regex_constants::collate is set, then the sequence
[a-b]
would match some character c1
if traits.transform("a") <= traits.transform(c1) <= traits.transform("b"). Note that this function takes a character sequence as the argument to accomodate to the ranges defined like [[.ae.]-d].std::regex_traits回报std::use_facet<std::collate<CharT>>(getloc()).transform(&*str.begin(), &*str.begin() + str.length())一些临时字符串的标准库专业
str
构造string_type str(first, last).原文:
Standard library specializations of std::regex_traits return std::use_facet<std::collate<CharT>>(getloc()).transform(&*str.begin(), &*str.begin() + str.length()) for some temporary string
str
constructed as string_type str(first, last).[编辑] 参数
first, last | - | ,一对
ForwardIterator s确定要比较的字符序列原文: a pair of ForwardIterator s which determines the sequence of characters to compare |
类型要求 | ||
-ForwardIt 必须满足 ForwardIterator 的要求。
|
[编辑] 返回值
整理键的字符序列
[first, last)
在目前充满的区域设置.原文:
The collation key for the character sequence
[first, last)
in the currently imbued locale.[编辑] 示例
本章尚未完成 原因:暂无示例 |