A string class that has a predefined string buffer. More...
#include <string.h>
Public Member Functions | |
stringbuf () | |
Create an empty instance of a string buffer. | |
stringbuf (const char *text) | |
Create a string buffer from a null terminated string. | |
void | operator= (const char *text) |
Assign a string buffer from a null terminated string. | |
void | operator= (string &object) |
Assign a string buffer from another string object. |
A string class that has a predefined string buffer.
The string class and buffer are allocated together as one object. This allows one to use string objects entirely resident on the local stack as well as on the heap. Using a string class on the local stack may be more convenient than a char array since one can use all the features of the class including assignment and concatenation which a char buffer cannot as easily do.
Definition at line 1616 of file string.h.
ucc::stringbuf< S >::stringbuf | ( | const char * | text | ) | [inline] |
void ucc::stringbuf< S >::operator= | ( | string & | object | ) | [inline] |
Assign a string buffer from another string object.
object | to assign from. |
Reimplemented from ucc::memstring.
void ucc::stringbuf< S >::operator= | ( | const char * | text | ) | [inline] |
Assign a string buffer from a null terminated string.
text | to assign to object. |
Reimplemented from ucc::memstring.