Tkrzw
|
Simplified string_view to convey nullptr and be modifiable. More...
#include <tkrzw_str_util.h>
Public Member Functions | |
NullableStringView () | |
Constructor for an undefined region. More... | |
NullableStringView (const char *str) | |
Constructor for a C-string. More... | |
NullableStringView (const char *data, size_t size) | |
Constructor for a specific region. More... | |
NullableStringView (const std::string &str) | |
Constructor for a string object. More... | |
NullableStringView (const std::string_view &str) | |
Constructor for a string view object. More... | |
const char * | data () const |
Gets the pointer to the data region. More... | |
size_t | size () const |
Gets the size of the region. More... | |
std::string_view | Get () const |
Gets the string_view object. More... | |
void | Set (const char *data, size_t size) |
Sets the data. More... | |
void | Set (std::string_view str) |
Sets the data by a string view. More... | |
Simplified string_view to convey nullptr and be modifiable.
tkrzw::NullableStringView::NullableStringView | ( | ) |
Constructor for an undefined region.
|
explicit |
Constructor for a C-string.
tkrzw::NullableStringView::NullableStringView | ( | const char * | data, |
size_t | size | ||
) |
Constructor for a specific region.
|
explicit |
Constructor for a string object.
|
explicit |
Constructor for a string view object.
const char* tkrzw::NullableStringView::data | ( | ) | const |
Gets the pointer to the data region.
size_t tkrzw::NullableStringView::size | ( | ) | const |
Gets the size of the region.
std::string_view tkrzw::NullableStringView::Get | ( | ) | const |
Gets the string_view object.
void tkrzw::NullableStringView::Set | ( | const char * | data, |
size_t | size | ||
) |
Sets the data.
void tkrzw::NullableStringView::Set | ( | std::string_view | str | ) |
Sets the data by a string view.