SliceBuilder.insert

Insert a character to a specified position in the slice.

Enlarges the slice by 1 char. Note that the slice can only extend up to the current position in the Reader buffer.

struct SliceBuilder
pure nothrow @nogc @system
void
insert
(
const dchar c
,
const size_t position
)

Parameters

c dchar

The character to insert.

position size_t

Position to insert the character at in code units, not code points. Must be less than slice length(); a previously returned length() can be used.

Meta