authorgravatar for 51028130+yettinmoor@users.noreply.github.comyettinmoor <51028130+yettinmoor@users.noreply.github.com> 2020-09-04 21:11:09+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-09-04 22:11:09+03:00
log0c43b6ef5c26f927b62eeaf3b365c88b07bf8d1a
treebfedd33ef8a22767e7a39705be1450ae00022019
parent6b2f4fd20d3c85e5db592f76dea8e56da54e9211
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

document how to escape curly braces in fmt.format


1 files changed, 2 insertions(+), 0 deletions(-)

lib/std/fmt.zig+2
......@@ -82,6 +82,8 @@ fn peekIsAlign(comptime fmt: []const u8) bool {
8282/// This allows user types to be formatted in a logical manner instead of dumping all fields of the type.
8383///
8484/// A user type may be a `struct`, `vector`, `union` or `enum` type.
85///
86/// To print literal curly braces, escape them by writing them twice, e.g. `{{` or `}}`.
8587pub fn format(
8688 writer: anytype,
8789 comptime fmt: []const u8,