string: add a templated transform comparator
This commit is contained in:
parent
a1460a240f
commit
452328957d
12
string.hpp
12
string.hpp
@ -339,11 +339,21 @@ namespace cruft::string {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (a_cursor == a.end () && b_cursor != b.end ())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename A, typename B>
|
||||
requires (!std::is_same_v<A,B>)
|
||||
bool operator() (A &&a, B &&b) const noexcept
|
||||
{
|
||||
return (*this) (
|
||||
std::string_view (a),
|
||||
std::string_view (b)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user