Container‐based version of the <algorithm> std::lexicographical_compare() function to lexicographically compare (e.g. sort words alphabetically) two container sequences. The comparison is performed using operator<. Note that capital letters ("A‐Z") have ASCII values less than lowercase letters ("a‐z").
Synopsis
Declared in <absl/algorithm/container.h>
template<
typename Sequence1,
typename Sequence2>
constexpr
bool
c_lexicographical_compare(
Sequence1 const& sequence1,
Sequence2 const& sequence2);
Return Value
true if sequence1 is lexicographically less than sequence2, otherwise false.
Parameters
Name |
Description |
sequence1 |
The first container. |
sequence2 |
The second container. |
Created with MrDocs