Skip to content

Formatting (std.fmt)

The fmt module provides utilities for advanced string formatting and manipulation.


You can format strings using arguments via fmt.format.

import std.fmt
let a = (spidey, peter)
let (name, rname) = a
let formated = fmt.format("hello {} - {}", name, rname)
println(formated)
Method Arguments Returns Description
fmt.format template: String, args: Unknown String Formats a template string using either a vector of positional arguments or a formula of named arguments.