Formatting (std.fmt)
The fmt module provides utilities for advanced string formatting and manipulation.
String Formatting
Section titled “String Formatting”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)API Summary Table
Section titled “API Summary Table”| 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. |
