std::match_results::format
来自cppreference.com
< cpp | regex | match results
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
template< class OutputIt > OutputIter format( OutputIt out, |
(1) | (C++11 起) |
template< class OutputIt, class ST, class SA > OutputIter format( OutputIt out, |
(2) | (C++11 起) |
template< class ST, class SA > std::basic_string<char_type,ST,SA> |
(3) | (C++11 起) |
string_type format( const char_type* fmt_s, std::regex_constants::match_flag_type flags = |
(4) | (C++11 起) |
复制*this,它指的是给定的格式,每个格式说明符或转义序列的字符序列替换的字符或字符内。
flags
指定的位掩码确定的格式说明符和转义序列确认..原文:
Copies the given format character sequence replacing each format specifier or escape sequence with either the characters it represents or characters within *this to which it refers to. The bitmasks specified by
flags
determine which format specifiers and escape sequences are recognized.的行为是不确定的,如果ready() != true.
原文:
The behavior is undefined if ready() != true.
1)
的格式的字符序列所定义的范围内
[fmt_first, fmt_last)
。生成的字符序列被复制到out
.原文:
The format character sequence is defined by the range
[fmt_first, fmt_last)
. The resulting character sequence is copied to out
.2)
fmt
中的字符所定义的格式的字符序列。生成的字符序列被复制到out
.原文:
The format character sequence is defined by the characters in
fmt
. The resulting character sequence is copied to out
.3-4)
的格式的字符序列被定义在
fmt
和fmt_s
分别用字符。生成的字符序列被复制到一个新构造的字符串,则返回.原文:
The format character sequence is defined by the characters in
fmt
and fmt_s
respectively. The resulting character sequence is copied to a newly constructed string, which is returned.目录 |
[编辑] 参数
fmt_begin, fmt_end | - | 到一个范围内的字符,定义格式字符序列的指针
原文: pointers to a range of characters defining the format character sequence | ||||
fmt | - | 定义格式的字符序列的字符串
原文: string defining the format character sequence | ||||
fmt_s | - | 指针指向一个空结尾的字符串的定义格式字符序列的
原文: pointer to a null-terminated character string defining the format character sequence | ||||
out | - | 迭代器复制生成的字符序列
原文: iterator where to copy the resulting character sequence to | ||||
flags | - | 确认
原文: bitmask type specifying which format specifiers and escape sequences are recognized
| ||||
类型要求 | ||||||
-OutputIt 必须满足 OutputIterator 的要求。
|
[编辑] 返回值
1-2)
out
3-4)
新建成的字符串,其中包含生成的字符序列.
原文:
The newly constructed string containing resulting character sequence.
[编辑] 例外
(无)
[编辑] 示例
本章尚未完成 原因:暂无示例 |