Public Member Functions |
|
| charbuf () |
| | Create a new character buffer with an empty string.
|
| | charbuf (char *text) |
| | Create a character buffer with assigned text.
|
| | 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.
|
| char * | operator* () |
| | Get text by object pointer reference.
|
| 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.
|
template<size_t S>
class ucommon::charbuf< S >
A template to create a character array that can be manipulated as a string.
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.
- Author:
- David Sugar <dyfet@gnutelephony.org>
Definition at line 1490 of file string.h.