|
Public Member Functions |
| | SWBuf (const char *initVal=0) |
| | SWBuf Constructor - Creates an empty SWBuf object or an SWBuf initialized to a value from a const char *.
|
| | SWBuf (char initVal) |
| | SWBuf Constructor - Creates an SWBuf initialized to a value from a char.
|
| | SWBuf (const SWBuf &other) |
| | SWBuf Constructor - Creates an SWBuf initialized to a value from another SWBuf.
|
|
void | setFillByte (char ch) |
|
char | getFillByte () |
|
virtual | ~SWBuf () |
| | SWBuf Destructor - Cleans up instance of SWBuf.
|
| const char * | c_str () const |
| char & | charAt (unsigned int pos) |
| unsigned int | size () const |
| | size() and length() return only the number of characters of the string.
|
| unsigned int | length () const |
| | size() and length() return only the number of characters of the string.
|
| void | set (const char *newVal) |
| | SWBuf::set - sets this buf to a new value.
|
| void | set (const SWBuf &newVal) |
| | SWBuf::set - sets this buf to a new value If the allocated memory is bigger than the new string, it will NOT be resized.
|
| void | setSize (unsigned int len) |
| | SWBuf::setSize - Size this buffer to a specific length.
|
| void | append (const char *str) |
| | SWBuf::append - appends a value to the current value of this SWBuf.
|
| void | append (const SWBuf &str) |
| | SWBuf::append - appends a value to the current value of this SWBuf If the allocated memory is not enough, it will be resized accordingly.
|
| void | append (char ch) |
| | SWBuf::append - appends a value to the current value of this SWBuf If the allocated memory is not enough, it will be resized accordingly.
|
| void | appendFormatted (const char *format,...) |
| | SWBuf::appendFormatted - appends formatted strings to the current value of this SWBuf WARNING: This function can only write at most JUNKBUFSIZE to the string per call.
|
|
char * | getRawData () |
|
| operator const char * () const |
|
char & | operator[] (unsigned int pos) |
|
char & | operator[] (int pos) |
|
SWBuf & | operator= (const char *newVal) |
|
SWBuf & | operator= (const SWBuf &other) |
|
SWBuf & | operator+= (const char *str) |
|
SWBuf & | operator+= (char ch) |
|
SWBuf & | operator-= (unsigned int len) |
|
SWBuf & | operator-- (int) |
|
SWBuf | operator+ (const SWBuf &other) const |
|
SWBuf | operator+ (char ch) const |
Private Member Functions |
|
void | assureSize (unsigned int newsize) |
|
void | init () |
Private Attributes |
|
char * | buf |
|
char * | end |
|
char | fillByte |
|
unsigned int | allocSize |
Static Private Attributes |
|
char * | nullStr = "" |
|
char | junkBuf [8191] |