mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-02 20:32:49 +00:00
productionlist doesn't work on github, using parsed-literal instead.
This commit is contained in:
parent
7a93a8e8b7
commit
1aa8f2f5c5
16
README.rst
16
README.rst
@ -81,16 +81,16 @@ escaped by doubling: ``{{`` and ``}}``.
|
|||||||
|
|
||||||
The grammar for a replacement field is as follows:
|
The grammar for a replacement field is as follows:
|
||||||
|
|
||||||
.. productionlist::
|
.. parsed-literal::
|
||||||
|
|
||||||
replacement_field: "{" `arg_index` [":" `format_spec`] "}"
|
`replacement_field`: "{" `arg_index` [":" `format_spec`] "}"
|
||||||
arg_index: integer
|
`arg_index`: integer
|
||||||
format_spec: ["+"]["0"][`width`]["." `precision`][`type`]
|
`format_spec`: ["+"]["0"][`width`]["." `precision`][`type`]
|
||||||
width: integer
|
`width`: integer
|
||||||
precision: integer | "{" `arg_index` "}"
|
`precision`: integer | "{" `arg_index` "}"
|
||||||
type: "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "o" | "p" | "s" | "x" | "X"
|
`type`: "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "o" | "p" | "s" | "x" | "X"
|
||||||
|
|
||||||
Preceding the `width`_ field with ``0`` makes the padding to be placed
|
Preceding the `width` field with ``0`` makes the padding to be placed
|
||||||
after the sign (if any) but before the digits. This is used for printing
|
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.
|
fields in the form ``+000000120``. This option is only valid for numeric types.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user