std::char_traits::compare
From cppreference.com
< cpp | string | char traits
| int compare( const CharT* lhs, const CharT* rhs, std::size_t count );
|
||
Compares the first count characters of the character strings lhs and rhs. The comparison is done lexicographically.
Contents |
[edit] Parameters
| lhs, rhs | - | pointers to character strings to compare |
| count | - | the number of characters to compare from each character string |
[edit] Return value
Negative value if lhs is less than rhs.
0 if lhs is equal to rhs.
Positive value if lhs is greater than rhs.
[edit] Exceptions
(none)
[edit] Complexity
Linear.