Fixed-size string buffer. More...
Public Member Functions | |
VarChar () | |
Constructs a string that is empty. | |
VarChar (const char *src) | |
Constructs a string that is a copy of the given C-string. | |
VarChar (const char *src, size_t len) | |
Constructs a string that is a copy of all or part of the given C-string. | |
VarChar (const std::string &src) | |
Constructs a string that is a copy of the given string object. | |
size_t | length () const |
Returns the current number of elements. | |
const char * | c_str () const |
Returns the contents of a string as a C-style, null-terminated, string. | |
void | assign (const char *src) |
Assigns new character values to the contents of the string. | |
template<size_t N2> | |
void | assignAndTrim (const char(&str)[N2]) |
Assigns new character values to the contents of the string and trims trailing spaces. | |
void | assign (const std::string &str) |
Assigns new character values to the contents of the string. | |
int | assign (const char *src, size_t len) |
Assigns new character values to the contents of the string. | |
void | operator= (const char *src) |
Assigns new character values to the contents of the string. | |
void | operator= (const std::string &src) |
Assigns new character values to the contents of the string. | |
bool | operator== (const VarChar< N > &other) const |
Compares the contents with the given string object. | |
bool | operator!= (const VarChar< N > &other) const |
Compares the contents with the given string object. | |
bool | operator< (const VarChar< N > &other) const |
Compares the contents with the given string object. | |
bool | operator> (const VarChar< N > &other) const |
Compares the contents with the given string object. | |
bool | operator>= (const VarChar< N > &other) const |
Compares the contents with the given string object. | |
bool | operator<= (const VarChar< N > &other) const |
Compares the contents with the given string object. | |
void | copyTo (std::string &dst) |
Copies contents to the given string object. | |
size_t | copyTo (char *dest, size_t buffSize) |
Copies min(length(), buffSize-1) chars to the destination buffer with terminating zero. More... | |
Fixed-size string buffer.
size_t copyTo | ( | char * | dest, |
size_t | buffSize | ||
) |
Copies min(length(), buffSize-1) chars to the destination buffer with terminating zero.