Examples

Templates

Text with holes, rendered into owned bytes.

main (format, print)

main()
    name = "Ada"
    # Text with holes is a Template. Render it into owned bytes,
    # or hand it to something that renders, like print.line.
    greeting = format.bytes("Hello, {name}: {6 * 7}")
    # format.append consumes and returns the buffer it extends.
    longer = format.append(greeting, "!")
    # {&longer} borrows the bytes for rendering.
    print.line("{&longer} \{braces\}")
Hello, Ada: 42! {braces}