std::match_results
提供:cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <regex>
|
||
| template< class BidirIt, |
(C + + 11以来) | |
クラステンプレートstd::match_resultsは、正規表現マッチの結果を表す文字シーケンスのコレクションを保持している.
Original:
The class template std::match_results holds a collection of character sequences that represent the result of a regular expression match.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
これは特殊なアロケータアウェアコンテナです。それが唯一のデフォルトが作成またはstd::regex_search()またはstd::regex_match()アルゴリズムに渡すことで変更することができます.
Original:
This is a specialized allocator-aware container. It can only be default created or modified by passing to the std::regex_search() or std::regex_match() algorithms.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
match_resultに含まれる最初のsub_match(インデックス0)は常に正規表現によって作られ、標的配列内の完全一致を表し、それに続くsub_matchesは正規表現で部分式を区切る左括弧と配列内の対応するサブ表現の一致を表し.
Original:
The first sub_match (index 0) contained in a match_result always represents the full match within a target sequence made by a regex, and subsequent sub_matches represent sub-expression matches corresponding in sequence to the left parenthesis delimiting the sub-expression in the regex.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] 型の要件
-BidirIt must meet the requirements of BidirectionalIterator.
| ||
-Alloc must meet the requirements of Allocator.
|
[編集] スペシャ
一般的な文字のシーケンス型にはいくつかの特殊化が提供されています
Original:
Several specializations for common character sequence types are provided:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Defined in header
<regex> | |
| タイプ
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
cmatch
|
match_results<const char*> |
wcmatch
|
match_results<const wchar_t*> |
smatch
|
match_results<std::string::const_iterator> |
wsmatch
|
match_results<std::wstring::const_iterator> |
[編集] メンバータイプ
| メンバー·タイプ
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
allocator_type
|
Allocator |
value_type
|
std::sub_match<BidirIt> |
const_reference
|
const value_type& |
reference
|
const_reference |
const_iterator
|
実装は、定義された(下層のコンテナに依存します)
Original: implementation defined (depends on the underlying container) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
iterator
|
const_iterator |
difference_type
|
std::iterator_traits<BidirIt>::difference_type |
size_type
|
std::allocator_traits<Alloc>::size_type |
char_type
|
std::iterator_traits<BidirIt>::value_type |
string_type
|
std::basic_string<char_type> |
[編集] メンバ関数
| オブジェクトを作成します Original: constructs the object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| オブジェクトを破棄します Original: destructs the object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 内容が割り当てられます Original: assigns the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 関連したアロケータを返す Original: returns the associated allocator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
Original: State The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (パブリックメンバ関数) | |
Original: Size The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| マッチが成功したかどうかをチェックします Original: checks whether the match was successful The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| は完全に確立された結果の状態にマッチした回数を返します Original: returns the number of matches in a fully-established result state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| サブマッチの可能な最大数を返します Original: returns the maximum possible number of sub-matches The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
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. | |
| 特定のサブマッチの長さを返します Original: returns the length of the particular sub-match The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 特定のサブマッチの最初の文字の位置を返します Original: returns the position of the first character of the particular sub-match The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 特定のサブ一致する文字列を返します Original: returns the sequence of characters for the particular sub-match The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 指定されたサブマッチが返されます Original: returns specified sub-match The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 標的配列の先頭と完全一致の先頭の間のサブシーケンスを返します。. Original: returns sub-sequence between the beginning of the target sequence and the beginning of the full match. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 完全一致の終わりと標的配列の終わりまでの間にサブシーケンスを返します Original: returns sub-sequence between the end of the full match and the end of the target sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
Original: Iterators The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| サブマッチのリストの先頭を指すイテレータを返す Original: returns iterator to the beginning of the list of sub-matches The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| サブマッチのリストの末尾を指すイテレータを返す Original: returns iterator to the end of the list of sub-matches The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
Original: Format The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| formats match results for output (パブリックメンバ関数) | |
Original: Modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| スワップ内容 Original: swaps the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
[編集] 非メンバ関数
| 辞書的に2試合の結果で値を比較します Original: lexicographically compares the values in the two match result The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
std::swap()アルゴリズムを専門としていますOriginal: specializes the std::swap() algorithmThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |