ReXGlue SDK
Loading...
Searching...
No Matches
rex::string::StringKey Struct Reference

#include <rex/string/text.h>

Inheritance diagram for rex::string::StringKey:
[legend]

Classes

struct  Hash

Public Member Functions

 StringKey (const std::string_view value)
 StringKey (std::string value)
bool operator== (const StringKey &other) const
size_t hash () const

Static Public Member Functions

static StringKey Create (const std::string_view value)
static StringKey Create (std::string value)

Detailed Description

Case sensitive string key that borrows a view or owns a copy.

Constructor & Destructor Documentation

◆ StringKey() [1/2]

rex::string::StringKey::StringKey ( const std::string_view value)
inlineexplicit

Borrows a string. The string outlives the key.

◆ StringKey() [2/2]

rex::string::StringKey::StringKey ( std::string value)
inlineexplicit

Owns a string.

Member Function Documentation

◆ Create() [1/2]

StringKey rex::string::StringKey::Create ( const std::string_view value)
inlinestatic

Creates a key that owns a copy of a string.

◆ Create() [2/2]

StringKey rex::string::StringKey::Create ( std::string value)
inlinestatic

Creates a key that owns a string.

◆ hash()

size_t rex::string::StringKey::hash ( ) const
inline
Returns
FNV-1a hash of the code points.

◆ operator==()

bool rex::string::StringKey::operator== ( const StringKey & other) const
inline

Compares two keys byte for byte.


The documentation for this struct was generated from the following file: