|
| template<size_t aStringSize> |
| constexpr | StringLiteral (const char(&aString)[aStringSize]) |
| | Construct from a string literal.
|
|
constexpr | StringLiteral () noexcept=default |
| | Default constructor.
|
|
constexpr | StringLiteral (const StringLiteral &) noexcept=default |
| | Copy constructor.
|
| constexpr | StringLiteral (StringLiteral &&aString) noexcept=default |
| | Move constructor.
|
| constexpr StringLiteral & | operator= (const StringLiteral &) noexcept=default |
| | Copy assignment operator.
|
| constexpr StringLiteral & | operator= (StringLiteral &&) noexcept=default |
| | Move assignment operator.
|
| constexpr const char * | GetString () const |
| | Get the underlying C string.
|
| constexpr size_t | GetStringSize () const |
| | Get the string size including the null terminator.
|
| constexpr bool | operator== (const StringLiteral &b) const |
| | Compare with another StringLiteral for equality.
|
| bool | operator== (const char *b) const |
| | Compare with a C string for equality.
|
| bool | operator== (const std::string &b) const |
| | Compare with a std::string for equality.
|
|
| operator std::string () const |
| | Implicit conversion to std::string.
|
Compile-time string literal wrapper.
Stores a pointer to a string literal and its size, enabling constexpr comparisons and use as hash-map keys without allocations.