refactor: String, use std::ranges::lexicogriphical_compare to simplify CaselessCpm::less
This commit is contained in:
@ -164,7 +164,7 @@ bool CaselessCmp::operator()(const std::string &a, const std::string &b) const
|
||||
|
||||
bool CaselessCmp::less(const std::string_view &a, const std::string_view &b)
|
||||
{
|
||||
return std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end(), &deskflow::string::CaselessCmp::cmpLess);
|
||||
return std::ranges::lexicographical_compare(a, b, &deskflow::string::CaselessCmp::cmpLess);
|
||||
}
|
||||
|
||||
bool CaselessCmp::equal(const std::string &a, const std::string &b)
|
||||
|
||||
Reference in New Issue
Block a user