![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/string/StringBuffer.h>
Public Member Functions | |
StringBuffer (int capacity=64, int increment=32) | |
String | toString () |
CString | toCString () |
String | copyString () |
int | length (void) const |
void | reset (void) |
io::OutStream & | stream (void) |
![]() | |
Output (void) | |
Output (OutStream &stream) | |
OutStream & | stream (void) const |
void | setStream (OutStream &stream) |
void | flush (void) |
void | print (bool value) |
void | print (char chr) |
void | print (double value) |
void | print (void *value) |
void | print (const char *str) |
void | print (const CString str) |
void | print (const String &str) |
void | print (const IntFormat &fmt) |
void | print (const FloatFormat &fmt) |
void | print (const StringFormat &fmt) |
void | format (CString fmt,...) |
void | format (CString fmt, VarArg &args) |
bool | supportsANSI () |
void | print (t::int32 value) |
void | print (t::uint32 value) |
void | print (t::int64 value) |
void | print (t::uint64 value) |
As the ELM String class is immutable, the big building of strings may have a prohibitive cost. Instead, this class provides an economic way of concatenating strings.
|
inline |
Build a new string buffer.
capacity | Initial capacity of the buffer. |
increment | Incrementation size when buffer is enlarged. |
|
inline |
References BlockOutStream::block(), and BlockOutStream::size().
|
inline |
Get the length of the string stored in the buffer.
References BlockOutStream::size().
Referenced by ProcessBuilder::run(), and StringBuffer::toString().
Remove all characters from the string buffer.
References BlockOutStream::clear().
Referenced by VarExpander::write().
|
inline |
Get the an output stream to write to the string buffer.
Referenced by VarExpander::expand(), and Saver::Saver().
|
inline |
References BlockOutStream::block(), and BlockOutStream::write().
|
inline |
Convert the buffer to a string. The string buffer must no more be used after this call.
References BlockOutStream::detach(), StringBuffer::length(), and BlockOutStream::write().
Referenced by Path::append(), VarExpander::expand(), Plugger::getLastError(), String::join(), String::make(), AutoString::operator const string(), Plugger::plug(), String::replace(), ProcessBuilder::run(), Input::scanLine(), Input::scanWord(), Path::setExtension(), SystemException::SystemException(), and VarExpander::write().