lokinet/llarp/util/string_view.hpp

18 lines
374 B
C++
Raw Normal View History

2018-11-01 12:47:14 +00:00
#ifndef LLARP_STRING_VIEW_HPP
#define LLARP_STRING_VIEW_HPP
2019-02-24 02:45:40 +00:00
#include <absl/hash/hash.h>
#include <absl/strings/string_view.h>
2018-11-01 12:47:14 +00:00
namespace llarp
{
2019-02-24 02:45:40 +00:00
using string_view = absl::string_view;
using string_view_hash = absl::Hash< string_view >;
2018-11-01 12:47:14 +00:00
static std::string
string_view_string(const string_view& v)
{
2019-02-24 02:45:40 +00:00
return std::string(v);
2019-04-25 23:21:19 +00:00
}
2018-11-01 12:47:14 +00:00
} // namespace llarp
#endif