Template class for non-alloc strings. More...
#include <fixed_size_string.hpp>
Public Member Functions | |
fixed_string () noexcept | |
Default constructor. | |
fixed_string (const char *c_array, size_t n_chars) noexcept | |
fixed_string & | assign (const char *c_array, size_t n_chars) noexcept |
fixed_string (const char *c_string) noexcept | |
fixed_string & | operator= (const char *c_string) noexcept |
fixed_string (const std::string &str) noexcept | |
fixed_string & | operator= (const std::string &str) noexcept |
template<size_t N> | |
fixed_string & | operator= (const fixed_string< N > &rhs) noexcept |
const char * | c_str () const noexcept |
std::string | to_string () const |
bool | operator== (const char *rhs) const noexcept |
bool | operator== (const std::string &rhs) const noexcept |
template<size_t N> | |
bool | operator== (const fixed_string< N > &rhs) const noexcept |
bool | operator!= (const char *rhs) const noexcept |
bool | operator!= (const std::string &rhs) const noexcept |
template<size_t N> | |
bool | operator!= (const fixed_string< N > &rhs) const noexcept |
template<size_t N> | |
bool | operator< (const fixed_string< N > &rhs) const noexcept |
template<size_t N> | |
bool | operator> (const fixed_string< N > &rhs) const noexcept |
bool | operator< (const std::string &rhs) const noexcept |
bool | operator> (const std::string &rhs) const noexcept |
operator const char * () const noexcept | |
size_t | size () const noexcept |
int | compare (const char *str) const noexcept |
Compare with a C string. | |
int | compare (const std::string &str) const noexcept |
Compare with a std::string. | |
template<size_t N> | |
int | compare (const fixed_string< N > &str) const noexcept |
Compare with a fixed_string. | |
Static Public Attributes | |
static constexpr size_t | max_size = MAX_CHARS |
Template class for non-alloc strings.
Will be truncated when assigned from a longer string.
MAX_CHARS | Maximum number of characters is specified as the template parameter. Space for an additional null terminator will be reserved. |
|
inlinenoexcept |
Default constructor.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Compare with a C string.
str | C string to be compared with. |
std::string::compare()
.
|
inlinenoexcept |
Compare with a fixed_string.
str | fixed_string to be compared with. |
std::string::compare()
.
|
inlinenoexcept |
Compare with a std::string.
str | std::string to be compared with. |
std::string::compare()
.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
staticconstexpr |