CppCMS
|
This class represents a single captures subexpression. More...
#include <booster/booster/regex_match.h>
Public Types | |
typedef Iterator | iterator |
typedef std::iterator_traits < Iterator >::value_type | value_type |
typedef std::iterator_traits < Iterator >::difference_type | difference_type |
typedef std::basic_string < value_type > | string_type |
typedef std::pair< Iterator, Iterator > | pair_type |
Public Member Functions | |
difference_type | length () const |
operator string_type () const | |
string_type | str () const |
int | compare (sub_match const &other) const |
int | compare (string_type const &other) const |
int | compare (value_type const *s) const |
sub_match () | |
Public Attributes | |
bool | matched |
This class represents a single captures subexpression.
The subexpressions captured text is found between [first,second).
typedef std::basic_string<value_type> booster::sub_match< Iterator >::string_type |
The string type that this expression can be converted into, generally std::string.
booster::sub_match< Iterator >::sub_match | ( | ) | [inline] |
Default not-matched subexpressions.
int booster::sub_match< Iterator >::compare | ( | sub_match< Iterator > const & | other | ) | const [inline] |
Compare two subexpressions. Same as str().compare(other.str())
References booster::sub_match< Iterator >::str().
int booster::sub_match< Iterator >::compare | ( | string_type const & | other | ) | const [inline] |
Compare two subexpressions. Same as str().compare(other)
References booster::sub_match< Iterator >::str().
int booster::sub_match< Iterator >::compare | ( | value_type const * | s | ) | const [inline] |
Compare two subexpressions. Same as str().compare(s)
References booster::sub_match< Iterator >::str().
difference_type booster::sub_match< Iterator >::length | ( | ) | const [inline] |
The length of captured subexpression, 0 if matched==false.
References booster::sub_match< Iterator >::matched.
booster::sub_match< Iterator >::operator string_type | ( | ) | const [inline] |
Explicit conversion operator to string
References booster::sub_match< Iterator >::str().
string_type booster::sub_match< Iterator >::str | ( | ) | const [inline] |
Convert the subexpression to string. If matched is false, return empty string.
References booster::sub_match< Iterator >::matched.
Referenced by booster::sub_match< Iterator >::compare(), and booster::sub_match< Iterator >::operator string_type().
bool booster::sub_match< Iterator >::matched |
This flag is true if the expression was matched, false otherwise. if matched is false then there is no guarantees that first or second are valid iterators.
Referenced by booster::sub_match< Iterator >::length(), booster::match_results< Iterator >::operator[](), booster::match_results< Iterator >::prefix(), booster::sub_match< Iterator >::str(), and booster::match_results< Iterator >::suffix().