mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Remove Format string syntax section.
This commit is contained in:
parent
5f2ebc6b74
commit
a64300d4e6
23
README.rst
23
README.rst
@ -81,29 +81,6 @@ performed when formatting is complete:
|
||||
|
||||
ReportError("File not found: {0}") << path;
|
||||
|
||||
Format string syntax
|
||||
--------------------
|
||||
|
||||
A format string can contain "replacement fields" delimited by curly
|
||||
braces ``{}``. Text outside of braces is copied unchanged to the output.
|
||||
If you need to include a brace character in the literal text, it can be
|
||||
escaped by doubling: ``{{`` and ``}}``.
|
||||
|
||||
The grammar for a replacement field is as follows:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
`replacement_field`: "{" `arg_index` [":" `format_spec`] "}"
|
||||
`arg_index`: integer
|
||||
`format_spec`: ["+"]["0"][`width`]["." `precision`][`type`]
|
||||
`width`: integer
|
||||
`precision`: integer | "{" `arg_index` "}"
|
||||
`type`: "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "o" | "p" | "s" | "x" | "X"
|
||||
|
||||
Preceding the `width` field with ``0`` forces the padding to be placed
|
||||
after the sign (if any) but before the digits. This is used for printing
|
||||
fields in the form ``+000000120``. This option is only valid for numeric types.
|
||||
|
||||
Motivation
|
||||
----------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user