tlx
string_view.hpp File Reference
#include <algorithm>
#include <cstring>
#include <iterator>
#include <ostream>
#include <stdexcept>
#include <string>
#include <tlx/string/hash_djb2.hpp>

Go to the source code of this file.

Classes

class  StringView
 StringView is a reference to a part of a string, consisting of only a char pointer and a length. More...
 
struct  hash< tlx::StringView >
 

Namespaces

 tlx
 

Typedefs

using string_view = StringView
 make alias due to STL similarity More...
 

Functions

static bool operator== (const StringView &a, const std::string &b) noexcept
 equality operator to compare a StringView with a std::string More...
 
static bool operator== (const std::string &a, const StringView &b) noexcept
 equality operator to compare a StringView with a std::string More...
 
static bool operator!= (const StringView &a, const std::string &b) noexcept
 inequality operator to compare a StringView with a std::string More...
 
static bool operator!= (const std::string &a, const StringView &b) noexcept
 inequality operator to compare a StringView with a std::string More...
 
static bool operator< (const StringView &a, const std::string &b) noexcept
 less operator to compare a StringView with a std::string lexicographically More...
 
static bool operator< (const std::string &a, const StringView &b) noexcept
 less operator to compare a StringView with a std::string lexicographically More...
 
static bool operator> (const StringView &x, const std::string &y) noexcept
 
static bool operator> (const std::string &x, const StringView &y) noexcept
 
static bool operator<= (const StringView &x, const std::string &y) noexcept
 
static bool operator<= (const std::string &x, const StringView &y) noexcept
 
static bool operator>= (const StringView &x, const std::string &y) noexcept
 
static bool operator>= (const std::string &x, const StringView &y) noexcept
 
static bool operator== (const StringView &x, const char *y) noexcept
 equality operator to compare a StringView with a const char* More...
 
static bool operator== (const char *x, const StringView &y) noexcept
 equality operator to compare a StringView with a const char* More...
 
static bool operator!= (const StringView &x, const char *y) noexcept
 inequality operator to compare a StringView with a const char* More...
 
static bool operator!= (const char *x, const StringView &y) noexcept
 inequality operator to compare a StringView with a const char* More...
 
static bool operator< (const StringView &x, const char *y) noexcept
 
static bool operator< (const char *x, const StringView &y) noexcept
 
static bool operator> (const StringView &x, const char *y) noexcept
 
static bool operator> (const char *x, const StringView &y) noexcept
 
static bool operator<= (const StringView &x, const char *y) noexcept
 
static bool operator<= (const char *x, const StringView &y) noexcept
 
static bool operator>= (const StringView &x, const char *y) noexcept
 
static bool operator>= (const char *x, const StringView &y) noexcept