[PATCH] Document ? in format specifiers, e.g. {w=?}
[Thread Prev] | [Thread Next]
- Subject: [PATCH] Document ? in format specifiers, e.g. {w=?}
- From: "S. Gilles" <sgilles@xxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Sat, 23 Nov 2019 17:29:40 -0500
- To: "myrddin-dev" <myrddin-dev@xxxxxxxxxxxxxx>
- Cc: "S. Gilles" <sgilles@xxxxxxx>
For mysite; matching the {w=?} patchset. --- doc/libstd/fmt.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/libstd/fmt.txt b/doc/libstd/fmt.txt index 563049c..688c776 100644 --- a/doc/libstd/fmt.txt +++ b/doc/libstd/fmt.txt @@ -47,6 +47,11 @@ an integer can be padded with zeros and formatted in hex with the following format specifier: `{p=0,x}`. If you want a literal '{' character, it can be escaped by doubling it. +If the character `?` is used as the argument to a format parameter, the +actual argument used will be pulled out of the list of values. For +example, `std.put("{w=?,p=?}\n", 30, "a", "foo")` will produce the same +output as `std.put("{w=30,p=a}\n", "foo"). + None of the format specifiers print a newline character by default. Format Specifiers -- 2.24.0
- Prev by Date: [PATCH 2/2] Allow formatting arguments from variables
- Next by Date: Re: [PATCH 0/2] Use ? in format specifiers
- Previous by thread: Re: [PATCH 0/2] Use ? in format specifiers
- Next by thread: [PATCH v2 0/3] Use ? for width specifiers
- Index(es):