mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-02 03:40:12 +00:00
00a624ab40
The comparison done here was really weird: by comparing lengths *before* contents "zz" would sort before "aaa". It wasn't invalid for the specific purpose being used here (looking for true/false values), but would be highly broken if someone tried to use it elsewhere. Also renamed it because it really is just a `<` implementation, not a full cmp implementation.
26 lines
357 B
C++
26 lines
357 B
C++
#ifndef LLARP_STR_HPP
|
|
#define LLARP_STR_HPP
|
|
|
|
#include <util/string_view.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
bool
|
|
StrEq(const char *s1, const char *s2);
|
|
|
|
bool
|
|
IsFalseValue(string_view str);
|
|
|
|
struct CaselessLessThan
|
|
{
|
|
bool
|
|
operator()(string_view lhs, string_view rhs) const;
|
|
};
|
|
|
|
bool
|
|
IsTrueValue(string_view str);
|
|
|
|
} // namespace llarp
|
|
|
|
#endif
|