Esc

bytes

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

A borrowed contiguous view, valid until the next append, reset or deinit.

Signature

bytes :: (out: *Out) -> [] u8
Example
out: Out;
defer deinit(*out);
append(*out, "abc");
assert(bytes(*out).count == 3);

See also