Utf8StringWriter
Namespace: SnowBank.Buffers.Text · class
Implements: TextWriter, IDisposable, IAsyncDisposable
TextWriter that writes UTF-8 bytes into an in-memory buffer.
Constructors
Utf8StringWriter
Utf8StringWriter(SliceWriter writer)
Constructs a new writer using an existing destination buffer.
Utf8StringWriter(int capacity)
Constructs a new writer with a minimum initial capacity
Properties
Encoding
Encoding Encoding { get; }
Methods
GetBuffer
Slice GetBuffer()
Returns a Slice of the buffer
ToArray
byte[] ToArray()
Returns a new byte array with the contents of the buffer
Write
void Write(char value)
void Write(char[] buffer)
void Write(string value)
void Write(int value)
void Write(long value)
void Write(uint value)
void Write(ulong value)