|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
A matched sub-expression: a [first, second) range into the searched sequence.
More...
#include <regex_match.hpp>
Public Types | |
| using | iterator = BidirIt |
| The underlying iterator. | |
| using | value_type = typename std::iterator_traits< BidirIt >::value_type |
| The character type. | |
| using | difference_type = typename std::iterator_traits< BidirIt >::difference_type |
| Distance type. | |
| using | string_type = std::basic_string< value_type > |
| The owning string type. | |
Public Member Functions | |
| difference_type | length () const |
| Length of the sub-match (0 if it did not participate). | |
| string_type | str () const |
| The matched text as an owned string (empty if it did not participate). | |
| operator string_type () const | |
| Implicit conversion to the owned string (std::sub_match parity). | |
| std::basic_string_view< value_type > | view () const |
| A non-owning view of the matched text. | |
| int | compare (const string_type &other) const |
| Three-way length/lexicographic comparison against a string (std::sub_match::compare). | |
| int | compare (const sub_match &other) const |
Public Attributes | |
| BidirIt | first {} |
| Start of the sub-match. | |
| BidirIt | second {} |
| One past the end of the sub-match. | |
| bool | matched {false} |
| Whether this sub-expression participated. | |
A matched sub-expression: a [first, second) range into the searched sequence.
Contiguous iterators only — sub_match is built from byte offsets, which requires the underlying storage to be contiguous (a std::deque::iterator is random-access but not contiguous, so it is rejected).
| BidirIt | A contiguous iterator into the searched sequence. |
Definition at line 29 of file regex_match.hpp.
| using real::compat::sub_match< BidirIt >::difference_type = typename std::iterator_traits<BidirIt>::difference_type |
Distance type.
Definition at line 38 of file regex_match.hpp.
| using real::compat::sub_match< BidirIt >::iterator = BidirIt |
The underlying iterator.
Definition at line 36 of file regex_match.hpp.
| using real::compat::sub_match< BidirIt >::string_type = std::basic_string<value_type> |
The owning string type.
Definition at line 39 of file regex_match.hpp.
| using real::compat::sub_match< BidirIt >::value_type = typename std::iterator_traits<BidirIt>::value_type |
The character type.
Definition at line 37 of file regex_match.hpp.
|
inline |
Three-way length/lexicographic comparison against a string (std::sub_match::compare).
Definition at line 72 of file regex_match.hpp.
|
inline |
Definition at line 77 of file regex_match.hpp.
|
inline |
Length of the sub-match (0 if it did not participate).
Definition at line 46 of file regex_match.hpp.
|
inline |
Implicit conversion to the owned string (std::sub_match parity).
Definition at line 58 of file regex_match.hpp.
|
inline |
The matched text as an owned string (empty if it did not participate).
Definition at line 52 of file regex_match.hpp.
|
inline |
A non-owning view of the matched text.
Definition at line 64 of file regex_match.hpp.
| BidirIt real::compat::sub_match< BidirIt >::first {} |
Start of the sub-match.
Definition at line 41 of file regex_match.hpp.
| bool real::compat::sub_match< BidirIt >::matched {false} |
Whether this sub-expression participated.
Definition at line 43 of file regex_match.hpp.
| BidirIt real::compat::sub_match< BidirIt >::second {} |
One past the end of the sub-match.
Definition at line 42 of file regex_match.hpp.