Esc

reset

procedureextensionexperimentalsince 0.36.1Source
  • macOS: reset works on macOS
  • Linux: reset works on Linux
  • Windows: reset works on Windows
  • Wasm: reset is not available on Wasm

Clears a page while retaining array capacity for the next page.

Signature

reset :: (out: *Out)
Example
out: Out;
defer deinit(*out);
append(*out, "old");
reset(*out);
append(*out, "new");
assert(to_string(*out) == "new");

See also