Namespaces
Variants
Actions

std::sub_match<BidirIt>::compare

From cppreference.com
< cpp‎ | regex‎ | sub match
 
 
 
Regular expressions library
Classes
(C++11)
Algorithms
Iterators
Exceptions
Traits
Constants
(C++11)
Regex Grammar
 
std::sub_match
Member functions
sub_match::compare
Non-member functions
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20)
 
int compare( const sub_match& m ) const;
(1) (since C++11)
int compare( const string_type& s ) const;
(2) (since C++11)
int compare( const value_type* c ) const;
(3) (since C++11)
1) Compares two sub_matches directly by comparing their underlying character sequences. Equivalent to str().compare(m.str()).
2) Compares a sub_match with a std::basic_string. Equivalent to str().compare(s).
3) Compares a sub_match with a null-terminated sequence of the underlying character type pointed to by s. Equivalent to str().compare(c).

Contents