ae.utils.textout

Fast string building with minimum heap allocations.

Members

Functions

put
void put(ref S sink, N n)

Default implementation of put for numbers (uses decimal ASCII)

put
void put(ref S sink, dchar c)

Default implementation of put for dchars

Structs

BlindWriter
struct BlindWriter(T)

Sink which simply copies data to a pointer and advances it. No reallocation, no bounds check - unsafe.

CountingWriter
struct CountingWriter(T)

Sink which simply counts how much data is written to it.

Templates

countCopy
template countCopy(T)

Calls putter to count the length of the output, allocates a buffer of that size, and then calls putter a second time to write to the buffer. Returns the buffer.

Meta

Authors

Vladimir Panteleev <vladimir@thecybershadow.net>

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.