SliceBuilder

Used to build slices of already read data in Reader buffer, avoiding allocations.

Usually these slices point to unchanged Reader data, but sometimes the data is changed due to how YAML interprets certain characters/strings.

See begin() documentation.

Postblit

Copying this object is disabled.

A postblit is present on this object, but not explicitly documented in the source.

Members

Functions

begin
void begin()

Begin building a slice.

finish
char[] finish()

Finish building a slice and return it.

insert
void insert(const dchar c, const size_t position)

Insert a character to a specified position in the slice.

length
size_t length()

Get the current length of the slice.

write
void write(scope char[] str)

Write a string to the slice being built.

write
void write(dchar c)

Write a character to the slice being built.

Structs

Transaction
struct Transaction

A slice building transaction.

Meta