mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 08:14:48 +00:00
document how to escape curly braces in fmt.format
This commit is contained in:
parent
6b2f4fd20d
commit
0c43b6ef5c
@ -82,6 +82,8 @@ fn peekIsAlign(comptime fmt: []const u8) bool {
|
||||
/// This allows user types to be formatted in a logical manner instead of dumping all fields of the type.
|
||||
///
|
||||
/// A user type may be a `struct`, `vector`, `union` or `enum` type.
|
||||
///
|
||||
/// To print literal curly braces, escape them by writing them twice, e.g. `{{` or `}}`.
|
||||
pub fn format(
|
||||
writer: anytype,
|
||||
comptime fmt: []const u8,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user