lokinet/llarp/util/str.hpp

34 lines
597 B
C++
Raw Normal View History

2018-12-12 02:17:40 +00:00
#ifndef LLARP_STR_HPP
#define LLARP_STR_HPP
#include <util/string_view.hpp>
2018-12-12 02:17:40 +00:00
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;
};
2019-07-02 09:06:29 +00:00
2018-12-12 02:17:40 +00:00
bool
IsTrueValue(string_view str);
2018-12-12 02:17:40 +00:00
/// Trim leading and trailing (ascii) whitespace from the given string;
/// returns a string_view of the trimmed part of the string.
#ifdef __GNUG__
2020-02-23 19:37:44 +00:00
[[gnu::warn_unused_result]]
#endif
string_view
TrimWhitespace(string_view str);
2018-12-12 02:17:40 +00:00
} // namespace llarp
#endif