UCommon
|
A template to create a string array that automatically erases. More...
#include <secure.h>
Public Member Functions | |
void | clear (void) |
Clear current key memory. | |
keystring () | |
Create a new character buffer with an empty string. | |
keystring (const char *text) | |
Create a character buffer with assigned text. More... | |
size_t | len (void) const |
Get current length of string. More... | |
operator bool () const | |
Test if data is contained in the object. More... | |
operator char * () | |
Get text by casting reference. More... | |
bool | operator! () const |
Test if the object is empty. More... | |
char * | operator() (size_t offset) |
Get a pointer to an offset in the object by expression operator. More... | |
char * | operator* () |
Get text by object pointer reference. More... | |
void | operator+= (const char *text) |
Concatenate text into the object. More... | |
void | operator= (const char *text) |
Assign null terminated text to the object. More... | |
char & | operator[] (size_t offset) const |
Array operator to get a character from the object. More... | |
size_t | size (void) const |
Get allocated size of the object. More... | |
~keystring () | |
Clear memory when destroyed. | |
A template to create a string array that automatically erases.
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |