libstdc++
|
These functions perform formatted substitution of the matched character sequences into their target. The format specifiers and escape sequences accepted by these functions are determined by their flags
parameter as documented above.
The results of a match or search operation.
A collection of character sequences representing the result of a regular expression match. Storage for the collection is allocated and freed as necessary by the member functions of class template match_results.
This class satisfies the Sequence requirements, with the exception that only the operations defined for a const-qualified Sequence are supported.
The sub_match object stored at index 0 represents sub-expression 0, i.e. the whole match. In this case the sub_match member matched is always true. The sub_match object stored at index n denotes what matched the marked sub-expression n within the matched expression. If the sub-expression n participated in a regular expression match then the sub_match member matched evaluates to true, and members first and second denote the range of characters [first, second) which formed that match. Otherwise matched is false, and members first and second point to the end of the sequence that was searched.
std::match_results< _Bi_iter, _Allocator >::match_results | ( | const _Allocator & | __a = _Allocator() | ) | [inline, explicit] |
Constructs a default match_results container.
Definition at line 1509 of file regex.h.
Referenced by std::match_results< _FwdIterT, _Alloc >::operator=().
std::match_results< _Bi_iter, _Allocator >::match_results | ( | const match_results< _Bi_iter, _Allocator > & | __rhs | ) | [inline] |
std::match_results< _Bi_iter, _Allocator >::match_results | ( | match_results< _Bi_iter, _Allocator > && | __rhs | ) | [inline] |
std::match_results< _Bi_iter, _Allocator >::~match_results | ( | ) | [inline] |
const_iterator std::match_results< _Bi_iter, _Allocator >::begin | ( | ) | const [inline] |
Gets an iterator to the start of the sub_match collection.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Allocator >.
Definition at line 1706 of file regex.h.
Referenced by std::operator==().
const_iterator std::match_results< _Bi_iter, _Allocator >::cbegin | ( | ) | const [inline] |
Gets an iterator to the start of the sub_match collection.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Allocator >.
const_iterator std::match_results< _Bi_iter, _Allocator >::cend | ( | ) | const [inline] |
Gets an iterator to one-past-the-end of the collection.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Allocator >.
bool std::match_results< _Bi_iter, _Allocator >::empty | ( | ) | const [inline] |
Indicates if the match_results contains no results.
true | The match_results object is empty. |
false | The match_results object is not empty. |
Reimplemented from std::vector< sub_match< _Bi_iter >, _Allocator >.
Definition at line 1594 of file regex.h.
Referenced by std::match_results< _FwdIterT, _Alloc >::end(), std::operator==(), std::match_results< _FwdIterT, _Alloc >::prefix(), and std::match_results< _FwdIterT, _Alloc >::suffix().
const_iterator std::match_results< _Bi_iter, _Allocator >::end | ( | ) | const [inline] |
Gets an iterator to one-past-the-end of the collection.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Allocator >.
Definition at line 1720 of file regex.h.
Referenced by std::match_results< _FwdIterT, _Alloc >::cend(), and std::operator==().
_Out_iter std::match_results< _Bi_iter, _Allocator >::format | ( | _Out_iter | __out, |
const char_type * | __fmt_first, | ||
const char_type * | __fmt_last, | ||
regex_constants::match_flag_type | __flags = regex_constants::format_default |
||
) | const [inline] |
Definition at line 1748 of file regex.h.
Referenced by std::match_results< _FwdIterT, _Alloc >::format().
_Out_iter std::match_results< _Bi_iter, _Allocator >::format | ( | _Out_iter | __out, |
const basic_string< char_type, _St, _Sa > & | __fmt, | ||
regex_constants::match_flag_type | __flags = regex_constants::format_default |
||
) | const [inline] |
basic_string<char_type, _St, _Sa> std::match_results< _Bi_iter, _Allocator >::format | ( | const basic_string< char_type, _St, _Sa > & | __fmt, |
regex_constants::match_flag_type | __flags = regex_constants::format_default |
||
) | const [inline] |
string_type std::match_results< _Bi_iter, _Allocator >::format | ( | const char_type * | __fmt, |
regex_constants::match_flag_type | __flags = regex_constants::format_default |
||
) | const [inline] |
allocator_type std::match_results< _Bi_iter, _Allocator >::get_allocator | ( | ) | const [inline] |
Gets a copy of the allocator.
Reimplemented from std::_Vector_base< sub_match< _Bi_iter >, _Allocator >.
difference_type std::match_results< _Bi_iter, _Allocator >::length | ( | size_type | __sub = 0 | ) | const [inline] |
size_type std::match_results< _Bi_iter, _Allocator >::max_size | ( | ) | const [inline] |
Gets the number of matches and submatches.
The number of matches for a given regular expression will be either 0 if there was no match or mark_count() + 1 if a match was successful. Some matches may be empty.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Allocator >.
match_results& std::match_results< _Bi_iter, _Allocator >::operator= | ( | const match_results< _Bi_iter, _Allocator > & | __rhs | ) | [inline] |
match_results& std::match_results< _Bi_iter, _Allocator >::operator= | ( | match_results< _Bi_iter, _Allocator > && | __rhs | ) | [inline] |
const_reference std::match_results< _Bi_iter, _Allocator >::operator[] | ( | size_type | __sub | ) | const [inline] |
Gets a sub_match reference for the match or submatch.
sub | indicates the submatch. |
This function gets a reference to the indicated submatch, or the entire match if sub
is zero.
If sub
>= size() then this function returns a sub_match with a special value indicating no submatch.
difference_type std::match_results< _Bi_iter, _Allocator >::position | ( | size_type | __sub = 0 | ) | const [inline] |
Gets the offset of the beginning of the indicated submatch.
sub | indicates the submatch. |
This function returns the offset from the beginning of the target sequence to the beginning of the submatch, unless the value of sub
is zero (the default), in which case this function returns the offset from the beginning of the target sequence to the beginning of the match.
Returns -1 if sub
is out of range.
const_reference std::match_results< _Bi_iter, _Allocator >::prefix | ( | ) | const [inline] |
Gets a sub_match representing the match prefix.
This function gets a reference to a sub_match object representing the part of the target range between the start of the target range and the start of the match.
Definition at line 1677 of file regex.h.
Referenced by std::operator==(), and std::match_results< _FwdIterT, _Alloc >::position().
bool std::match_results< _Bi_iter, _Allocator >::ready | ( | ) | const [inline] |
Indicates if the match_results is ready.
true | The object has a fully-established result state. |
false | The object is not ready. |
Definition at line 1561 of file regex.h.
Referenced by std::operator==(), std::match_results< _FwdIterT, _Alloc >::operator[](), std::match_results< _FwdIterT, _Alloc >::prefix(), and std::match_results< _FwdIterT, _Alloc >::suffix().
size_type std::match_results< _Bi_iter, _Allocator >::size | ( | ) | const [inline] |
Gets the number of matches and submatches.
The number of matches for a given regular expression will be either 0 if there was no match or mark_count() + 1 if a match was successful. Some matches may be empty.
Reimplemented from std::vector< sub_match< _Bi_iter >, _Allocator >.
Definition at line 1578 of file regex.h.
Referenced by std::match_results< _FwdIterT, _Alloc >::empty(), std::operator==(), std::match_results< _FwdIterT, _Alloc >::operator[](), and std::match_results< _FwdIterT, _Alloc >::position().
string_type std::match_results< _Bi_iter, _Allocator >::str | ( | size_type | __sub = 0 | ) | const [inline] |
const_reference std::match_results< _Bi_iter, _Allocator >::suffix | ( | ) | const [inline] |
Gets a sub_match representing the match suffix.
This function gets a reference to a sub_match object representing the part of the target range between the end of the match and the end of the target range.
Definition at line 1694 of file regex.h.
Referenced by std::operator==().
void std::match_results< _Bi_iter, _Allocator >::swap | ( | match_results< _Bi_iter, _Allocator > & | __that | ) | [inline] |
Swaps the contents of two match_results.
Definition at line 1821 of file regex.h.
Referenced by std::swap().