Import std.io.memory
StringWriter
class
Public Class StringWriter Implements Writer
Collects what's written to it, as text, which ToString gives.
Examples
Local writer = StringWriter()
Try Copy(StringReader("copied"), writer)
Try writer.WriteText(" and added")
Expect(writer.ToString() == "copied and added")-
A new StringWriter, with nothing written.
-
How many bytes it has.
-
Adds from's bytes to what it has. Throws an IOError when it would hold more than 2147483647 bytes.
-
What it has, as text, with U+FFFD for each byte that doesn't start well-formed UTF-8.
Report an issue with this page or with FutureBlitz on GitHub.