Basic module

builder_to_string

procedure · 1 overloadSource

The text in builder, in a new string; the string is allocated with the context allocator, not the builder's, and the caller frees it. With do_reset (the default) the builder is emptied afterwards, otherwise it keeps its text. extra_bytes_to_prepend leaves that many unwritten bytes in front of the text. A builder that has failed gives an empty string.

builder_to_string :: (
    builder: *String_Builder,
    extra_bytes_to_prepend := 0,
    do_reset := true
) -> string

Parameters

builder: *String_Builder
extra_bytes_to_prepend := 0
do_reset := true

Returns

string

See also