Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Document variable-length padding in {w=?}


---
 doc/libstd/fmt.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/doc/libstd/fmt.txt b/doc/libstd/fmt.txt
index 563049c..e872869 100644
--- a/doc/libstd/fmt.txt
+++ b/doc/libstd/fmt.txt
@@ -58,7 +58,11 @@ specified below.
 <dl>
     <dt>w=WIDTH</dt>
     <dd><p>Fill out to at least width WIDTH, filling with pad
-    characters.</p></dd>
+    characters.</p>
+    <p>If WIDTH is `?`, then the next argument passed must be an integer
+    type, it is used as the width, e.g. `std.put("{w=?}{w=?}\n", "foo",
+    20, "bar", max_width)`.</p>
+    </dd>
 
     <dt>p=PAD</dt>
     <dd>
-- 
2.24.0