#include <util.h>
Public Methods | |
opp_string () | |
opp_string (const char *s) | |
opp_string (opp_string &s) | |
~opp_string () | |
operator const char * () const | |
char* | buffer () const |
char* | allocate (unsigned size) |
const char* | operator= (const char *s) |
opp_string& | operator= (const opp_string &s) |
Recommended use: as class member, where otherwise the class members would have to call opp_strdup() and delete for the char* member.
|
Constructor. |
|
Constructor. |
|
Copy constructor. |
|
Destructor. |
|
Allocates a buffer of the given size. |
|
Returns pointer to the internal buffer where the string is stored. It is allowed to write into the string via this pointer, but the length of the string should not be exceeded. |
|
Returns pointer to the string. |
|
Assignment. |
|
Deletes the old value and opp_strdup()'s the new value to create the object's own copy. |