1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/llarp/util/str.hpp
Jason Rhinelander 98c34d995b De-abseil: Add our own llarp::TrimWhiteSpace
Adds a TrimWhiteSpace instead of using abseil's.

Adds Catch2 tests for it, and also converts the existing str tests to
catch (which look much, much nicer than the gtest ones).
2020-02-24 14:27:44 -04:00

30 lines
514 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);
/// Trim leading and trailing (ascii) whitespace from the given string; the
/// string is modified in-place.
void
TrimWhiteSpace(std::string &str);
} // namespace llarp
#endif