Esc

to_string

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

A borrowed string with the same lifetime as bytes.

Signature

to_string :: (out: *Out) -> string
Example
out: Out;
defer deinit(*out);
append(*out, "abc");
assert(to_string(*out) == "abc");

See also