#include <skStringBuffer.h>
Public Methods | |
skStringBuffer (USize capacity, USize growth_increment=16) | |
Constructs a blank buffer of the given capacity. More... | |
skStringBuffer (const skString &s, USize growth_increment=16) | |
Constructs a buffer from the given string. More... | |
skStringBuffer (const skStringBuffer &s) | |
Copy constructor - it takes a copy of the underlying buffer. More... | |
~skStringBuffer () | |
Destroys the underlying character buffer. | |
skStringBuffer & | operator= (const skStringBuffer &s) |
Assignment operator- it takes a copy of the underlying buffer. More... | |
void | append (Char ch) |
Adds a character to the buffer, growing it if necessary. More... | |
void | append (const skString &s) |
Adds a string to the buffer, growing it if necessary. More... | |
void | append (const Char *s) |
Adds a string to the buffer, growing it if necessary. More... | |
skString | toString () |
Creates a new string that owns the underlying buffer. More... | |
skString | toStringCopy () const |
Creates a new string that copies the underlying buffer. More... | |
operator const Char * () const | |
Returns the underlying buffer. More... | |
USize | length () const |
Returns the current length of the text in the buffer. More... | |
USize | capacity () const |
Returns the current capacity the buffer. More... |
|
Constructs a blank buffer of the given capacity. The buffer's length will be zero.
|
|
Constructs a buffer from the given string. The string's data will be copied. The buffer's initial capacity and length will be the length of the string.
|
|
Copy constructor - it takes a copy of the underlying buffer.
|
|
Adds a string to the buffer, growing it if necessary.
|
|
Adds a string to the buffer, growing it if necessary.
|
|
Adds a character to the buffer, growing it if necessary.
|
|
Returns the current capacity the buffer.
|
|
Returns the current length of the text in the buffer.
|
|
Returns the underlying buffer.
|
|
Assignment operator- it takes a copy of the underlying buffer.
|
|
Creates a new string that owns the underlying buffer. The current buffer is set to null.
|
|
Creates a new string that copies the underlying buffer. The current buffer remains the same
|