| Localization library | |||||||||||||||||||||||||
| Regular expressions library(C++11) | |||||||||||||||||||||||||
| Formatting library(C++20) | |||||||||||||||||||||||||
| Null-terminated sequence utilities | |||||||||||||||||||||||||
| Byte strings | |||||||||||||||||||||||||
| Multibyte strings | |||||||||||||||||||||||||
| Wide strings | |||||||||||||||||||||||||
| Primitive numeric conversions | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| Text encoding identifications | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| Classes | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Algorithms | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Iterators | ||||
(C++11) | ||||
(C++11) | ||||
| Exceptions | ||||
(C++11) | ||||
| Traits | ||||
(C++11) | ||||
| Constants | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Regex Grammar | ||||
(C++11) |
| 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) |
sub_matches directly by comparing their underlying character sequences. Equivalent tostr().compare(m.str()).sub_match with a null-terminated sequence of the underlying character type pointed to bys. Equivalent tostr().compare(c).Contents |
| m | - | a reference to another sub_match |
| s | - | a reference to a string to compare to |
| c | - | a pointer to a null-terminated character sequence of the underlyingvalue_type to compare to |
A value less than zero if thissub_match isless than the other character sequence, zero if the both underlying character sequences are equal, greater than zero if thissub_match isgreater than the other character sequence.
This function is infrequently used directly by application code. Instead, one of the non-member comparison operators is used.
| This section is incomplete Reason: no example |
| compares two strings (public member function of std::basic_string<CharT,Traits,Allocator>)[edit] | |
| converts to the underlying string type (public member function)[edit] | |
(removed in C++20)(removed in C++20)(removed in C++20)(removed in C++20)(removed in C++20)(C++20) | compares asub_match with anothersub_match, a string, or a character(function template)[edit] |