## wxStringOutputStream

This class implements an output stream which writes data either to a user-provided or internally allocated string. Note that currently this stream does not support seeking but can tell its current position.

Derived from

wxOutputStream

Include files

<wx/sstream.h>

Members

wxStringOutputStream::wxStringOutputStream
wxStringOutputStream::GetString

### wxStringOutputStream::wxStringOutputStream

wxStringOutputStream(wxString *str = `NULL`)

If the provided pointer is non-`NULL`, data will be written to it. Otherwise, an internal string is used for the data written to this stream, use GetString() to get access to it.

If str is used, data written to the stream is appended to the current contents of it, i.e. the string is not cleared here. However if it is not empty, the positions returned by TellO will be offset by the initial string length, i.e. initial stream position will be the initial length of the string and not 0.

### wxStringOutputStream::GetString

const wxString& GetString() const

Returns the string containing all the data written to the stream so far.