website/docs: document difference in formatting strings with width and precision (#25499)

This commit is contained in:
Kristin Laemmert 2020-07-07 14:09:39 -04:00 committed by GitHub
parent 2ff44acecc
commit c4ce84269a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -117,6 +117,10 @@ The function produces an error if the format string requests an impossible
conversion or access more arguments than are given. An error is produced also conversion or access more arguments than are given. An error is produced also
for an unsupported format verb. for an unsupported format verb.
-> **Note:** Width and precision modifiers with non-numeric types such as
strings (`%s`) are interpreted differently. Setting either width or precision to
zero is the same as not including them at all.
## Related Functions ## Related Functions
* [`formatdate`](./formatdate.html) is a specialized formatting function for * [`formatdate`](./formatdate.html) is a specialized formatting function for