|
Public Member Functions |
void | clear (void) |
| Clear current key memory.
|
| keystring (char *text) |
| Create a character buffer with assigned text.
|
| keystring () |
| Create a new character buffer with an empty string.
|
size_t | len (void) |
| Get current length of string.
|
char * | operator * () |
| Get text by object pointer reference.
|
| operator bool () |
| Test if data is contained in the object.
|
| operator char * () |
| Get text by casting reference.
|
bool | operator! () |
| Test if the object is empty.
|
char * | operator() (size_t offset) |
| Get a pointer to an offset in the object by expression operator.
|
void | operator+= (char *text) |
| Concatenate text into the object.
|
void | operator= (char *text) |
| Assign null terminated text to the object.
|
char & | operator[] (size_t offset) |
| Array operator to get a character from the object.
|
size_t | size (void) |
| Get allocated size of the object.
|
| ~keystring () |
| Clear memory when destroyed.
|
This is a mini string/stringbuf class that supports a subset of functionality but does not require a complex supporting object. Like stringbuf, this can be used to create local string variables. When the object falls out of scope it's memory is reset.