Standard library / std::fmt

std::fmt

std::fmt defines the formatting model used by std::io::print/println by string-building helpers. It follows a Zig-std.fmt-style format-string syntax.

Full reference: fmt.

Notes#

  • Supported forms is available to support std::io printing.
  • Full reference: fmt

Examples#

Example: println formatting#

import std::io;

fn main () -> int {
  std::io::println("name={s} ok={}", "silk", true);
  return 0;
}

See also#

  • Full reference: fmt
  • Printing: io

Source repository · Edit this page · View Markdown

Quick links

Type to search across the site. Use the up and down arrow keys to choose a result, Enter to open it, and Escape to close.