Immutable string container. More...
#include <kanzi/core/string/immutable_string.hpp>
Public Member Functions | |
const char * | c_str () const |
Access string data. More... | |
ImmutableString ()=default | |
Empty constructor. More... | |
ImmutableString (string_view content) | |
Constructor. More... | |
ImmutableString (ImmutableString &&other) noexcept | |
Move constructor. More... | |
operator string_view () const | |
string_view operator. More... | |
ImmutableString & | operator= (ImmutableString &&other) noexcept |
Move operator. More... | |
Friends | |
bool | operator!= (const ImmutableString &lhs, string_view rhs) |
Not equals operator. More... | |
bool | operator!= (string_view lhs, const ImmutableString &rhs) |
Not equals operator. More... | |
bool | operator!= (const ImmutableString &lhs, const ImmutableString &rhs) |
Not equals operator. More... | |
bool | operator< (const ImmutableString &lhs, const ImmutableString &rhs) |
Less than operator. More... | |
bool | operator== (const ImmutableString &lhs, string_view rhs) |
Comparison operator. More... | |
bool | operator== (string_view lhs, const ImmutableString &rhs) |
Comparison operator. More... | |
bool | operator== (const ImmutableString &lhs, const ImmutableString &rhs) |
Comparison operator. More... | |
void | swap (ImmutableString &left, ImmutableString &right) |
Swap operation. More... | |
Immutable string container.
Represents a string that is allocated dynamically but cannot be changed.
|
explicitdefault |
Empty constructor.
|
inlineexplicit |
Constructor.
content | String to construct from. |
|
inlinenoexcept |
Move constructor.
other | Source string. |
|
inline |
Access string data.
|
inline |
string_view operator.
|
inlinenoexcept |
Move operator.
other | Source string. |
|
friend |
Swap operation.
left | Left operand. |
right | Right operand. |
|
friend |
Comparison operator.
lhs | Left-hand side operand. |
rhs | Right-hand side operand. |
|
friend |
Comparison operator.
lhs | Left-hand side operand. |
rhs | Right-hand side operand. |
|
friend |
Comparison operator.
lhs | Left-hand side operand. |
rhs | Right-hand side operand. |
|
friend |
Not equals operator.
lhs | Left-hand side operand. |
rhs | Right-hand side operand. |
|
friend |
Not equals operator.
lhs | Left-hand side operand. |
rhs | Right-hand side operand. |
|
friend |
Not equals operator.
lhs | Left-hand side operand. |
rhs | Right-hand side operand. |
|
friend |
Less than operator.
lhs | Left-hand side operand. |
rhs | Right-hand side operand. |