formatting: fix docs for padding and use a better example

Make the padding number coherent between the example and the docs.
Also bump it from 3 to 10 because [[3.14 "%'#5f" printf]] is "3.140000"
because the default precision is 6.
db4
Jon Harper 2015-08-24 22:40:39 +02:00
parent 03630e8100
commit 6ee9fad443
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ HELP: printf
{ $list
{ { $snippet "%5s" } " formats a string padding with spaces up to 5 characters wide." }
{ { $snippet "%03d" } " formats an integer padding with zeros up to 3 characters wide." }
{ { $snippet "%'#5f" } " formats a float padding with " { $snippet "#" } " up to 3 characters wide." }
{ { $snippet "%'#10f" } " formats a float padding with " { $snippet "#" } " up to 10 characters wide." }
{ { $snippet "%-10d" } " formats an integer to 10 characters wide and left-aligns." }
}
$nl