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
void
insert
@system
(
const dchar c
,
const size_t position
)

Parameters

c
Type: dchar

The character to insert.

position
Type: 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