#include <string.h>
Public Member Functions | |
| ststring () | |
| Default onstructor. | |
| ststring (char const *str) | |
| Constructor initializing the encapsulated string. | |
| ststring (ststring const &sts) | |
| Copy constructor. | |
| ststring & | operator= (ststring const &right) |
| Assignment operator (for cstring r-values). | |
| ststring & | operator= (char const *right) |
| Assigns a new string. | |
| bool | operator== (char const *right) const |
| Checks two strings for equality, byte-per-byte. | |
| bool | operator!= (char const *right) const |
| Checks two strings for difference, byte-per-byte. | |
| operator char * () | |
| Conversion operator (to char *). | |
| operator char const * () const | |
| Conversion operator (to const char *). | |
| char * | str () |
| Returns The encapsulated string, or NULL if it is empty. | |
| char const * | str () const |
| Returns the encapsulated string, or NULL if it is empty (const version). | |
Static Public Attributes | |
| static size_t const | max_len = LEN |
| Maximum length of the string. | |
| misc::ststring< LEN >::ststring | ( | char const * | str | ) | [inline, explicit] |
This constructor initializes the encapsulated string to a copy of the given string.
| [in] | str | The string to copy. If it is longer than what the encapsulated string can contain, it is truncated. |
| ststring& misc::ststring< LEN >::operator= | ( | char const * | right | ) | [inline] |
Assigns a new string to the encapsulated string.
| [in] | right | The string to copy. |
| bool misc::ststring< LEN >::operator== | ( | char const * | right | ) | const [inline] |
Does a byte-per-byte comparison of the encapsulated string and the given one. The comparison is done only on the characters that would actually fit in the encapsulated string.
| [in] | right | The string to compare to the encapsulated string. |
| bool misc::ststring< LEN >::operator!= | ( | char const * | right | ) | const [inline] |
Does a byte-per-byte comparison of the encapsulated string and the given one. The comparison is done only on the characters that would actually fit in the encapsulated string.
| [in] | right | The string to compare to the encapsulated string. |
1.5.3