std::basic_regex::assign
来自cppreference.com
< cpp | regex | basic regex
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
| basic_regex& assign( const basic_regex& other ); |
(1) | (C++11 起) |
| basic_regex& assign( basic_regex&& that ); |
(2) | (C++11 起) |
| basic_regex& assign( const CharT* s, flag_type f = std::regex_constants::ECMAScript ); |
(3) | (C++11 起) |
| basic_regex& assign( const charT* ptr, size_t count, flag_type f = regex_constants::ECMAScript ); |
(4) | (C++11 起) |
| template< class ST, class SA > basic_regex& assign( const std::basic_string<CharT,ST,SA>& str, |
(5) | (C++11 起) |
| template< class InputIt > basic_regex& assign( InputIt first, InputIt last, |
(6) | (C++11 起) |
| basic_regex& assign( std::initializer_list<CharT> ilist, flag_type f = std::regex_constants::ECMAScript ); |
(7) | (C++11 起) |
指定的内容的正则表达式.
原文:
Assigns the contents to the regular expression.
1)
分配
other的内容。 flags()和mark_count()other.flags()和other.mark_count()在调用后的值相当于.原文:
Assigns the contents of
other. flags() and mark_count() are equivalent to the values of other.flags() and other.mark_count() after the call.2)
分配
other使用移动语义的内容。 flags()和mark_count()相当于other.flags()和other.mark_count()赋值之前的值。通话结束后,other是一个有效的,但非特指的状态.原文:
Assigns the contents of
other using move semantics. flags() and mark_count() are equivalent to the values of other.flags() and other.mark_count() before the assignment. After the call, other is in a valid, but unspecified state.3-7)
指定一个正则表达式的字符序列。的语法的标志被设置为
f。 mark_count()返回后产生的子表达式的数量显着的子表达式内的呼叫.原文:
Assigns a sequence of characters to the regular expression. The syntax flags are set to
f. mark_count() returns the number of marked subexpressions within the resulting subexpression after the call.3)
指定一个空结束的字符串所指向的
s.原文:
Assigns a null-terminated string pointed to by
s.4)
分配
count字符的序列,所指向的s.原文:
Assigns a sequence of
count characters, pointed to by s.5)
指定的字符串
str.6)
指定的字符的范围内
[first, last).原文:
Assigns the characters in the range
[first, last).7)
在初始化列表中
ilist指定的字符.原文:
Assigns the characters in the initializer list
ilist.目录 |
[编辑] 参数
| other | - | 另一个正则表达式分配
原文: another regular expression to assign |
| s | - | 指针到指定一个字符序列
原文: pointer to a character sequence to assign |
| str | - | 串分配
|
| first, last | - | 指定范围内的字符
|
| ilist | - | 初始化列表中包含的字符来指定
原文: initializer list containing characters to assign |
| 类型要求 | ||
-InputIt 必须满足 InputIterator 的要求。
| ||
[编辑] 返回值
*this
[编辑] 例外
1)
(无)
2)
3-7)
std::regex_error如果所提供的正则表达式是无效的。在这种情况下,不被修改的对象.
原文:
std::regex_error if the supplied regular expression is not valid. The object is not modified in that case.
[编辑] 示例
| 本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
| 分配的内容 (公共成员函数) | |