#include <skAsciiStringBuffer.h>
Public Member Functions | |
| skAsciiStringBuffer (USize capacity, USize growth_increment=16) | |
| Constructs a blank buffer of the given capacity. | |
| skAsciiStringBuffer (const skAsciiString &s, USize growth_increment=16) | |
| Constructs a buffer from the given string. | |
| skAsciiStringBuffer (const skAsciiStringBuffer &s) | |
| Copy constructor - it takes a copy of the underlying buffer. | |
| virtual | ~skAsciiStringBuffer () |
| Destroys the underlying character buffer. | |
| skAsciiStringBuffer & | operator= (const skAsciiStringBuffer &s) |
| Assignment operator - it takes a copy of the underlying buffer. | |
| void | append (char ch) |
| Adds a character to the buffer, growing it if necessary. | |
| void | append (const skAsciiString &s) |
| Adds a string to the buffer, growing it if necessary. | |
| void | append (const char *s) |
| Adds a string to the buffer, growing it if necessary. | |
| skAsciiString | toString () |
| Creates a new string that owns the underlying buffer. | |
| skAsciiString | toStringCopy () const |
| Creates a new string that copies the underlying buffer. | |
| operator const char * () const | |
| Returns the underlying buffer. | |
| USize | length () const |
| Returns the current length of the text in the buffer. | |
| USize | capacity () const |
| Returns the current capacity the buffer. | |
|
||||||||||||
|
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
|
1.3