std::match_results::format

来自cppreference.com

 
 
正則表達式庫
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_regex(C++11)
sub_match(C++11)
match_results(C++11)
演算法
Original:
Algorithms
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_match(C++11)
regex_search(C++11)
regex_replace(C++11)
迭代器
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_iterator(C++11)
regex_token_iterator(C++11)
例外
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_error(C++11)
性狀
Original:
Traits
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_traits(C++11)
常量
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
syntax_option_type(C++11)
match_flag_type(C++11)
error_type(C++11)
 
std::match_results
成員函數
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::match_results
match_results::~match_results
match_results::operator=
match_results::get_allocator
國家
Original:
State
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::ready
元素的訪問
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::size
match_results::max_size
match_results::empty
match_results::length
match_results::position
match_results::str
match_results::operator_at
match_results::prefix
match_results::suffix
迭代器
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::begin
match_results::cbegin
match_results::end
match_results::cend
格式
Original:
Format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::format
修飾符
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::swap
 
template< class OutputIt >

OutputIter format( OutputIt out,
                   const char_type* fmt_first, const char_type* fmt_last,
                   std::regex_constants::match_flag_type flags =

                       std::regex_constants::format_default ) const;
(1) (C++11 起)
template< class OutputIt, class ST, class SA >

OutputIter format( OutputIt out,
                   const basic_string<char_type,ST,SA>& fmt,
                   std::regex_constants::match_flag_type flags =

                       std::regex_constants::format_default ) const;
(2) (C++11 起)
template< class ST, class SA >

std::basic_string<char_type,ST,SA>
    format( const std::basic_string<char_type,ST,SA>& fmt,
            std::regex_constants::match_flag_type flags =

                std::regex_constants::format_default ) const;
(3) (C++11 起)
string_type format( const char_type* fmt_s,

                    std::regex_constants::match_flag_type flags =

                        std::regex_constants::format_default ) const;
(4) (C++11 起)
複製*this,它指的是給定的格式,每個格式說明符或轉義序列的字元序列替換的字元或字元內。 flags指定的位掩碼確定的格式說明符和轉義序列確認..
Original:
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.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
的行為是不確定的,如果ready() != true.
Original:
The behavior is undefined if ready() != true.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
的格式的字元序列所定義的範圍內[fmt_first, fmt_last)。生成的字元序列被複制到out.
Original:
The format character sequence is defined by the range [fmt_first, fmt_last). The resulting character sequence is copied to out.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
fmt中的字元所定義的格式的字元序列。生成的字元序列被複制到out.
Original:
The format character sequence is defined by the characters in fmt. The resulting character sequence is copied to out.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3-4)
的格式的字元序列被定義在fmtfmt_s分別用字元。生成的字元序列被複制到一個新構造的字元串,則返回.
Original:
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.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目錄

[编辑] 參數

fmt_begin, fmt_end -
到一個範圍內的字元,定義格式字元序列的指針
Original:
pointers to a range of characters defining the format character sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fmt -
定義格式的字元序列的字元串
Original:
string defining the format character sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fmt_s -
指針指向一個空結尾的字元串的定義格式字元序列的
Original:
pointer to a null-terminated character string defining the format character sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
out -
迭代器複製生成的字元序列
Original:
iterator where to copy the resulting character sequence to
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
flags -
確認指定的格式說明符和轉義序列的位掩碼類型
Original:
bitmask type specifying which format specifiers and escape sequences are recognized
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Type requirements
-
OutputIt must meet the requirements of OutputIterator.

[编辑] 返回值

1-2) out
3-4)
新建成的字元串,其中包含生成的字元序列.
Original:
The newly constructed string containing resulting character sequence.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 例外

(無)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 為例