diff --git a/doc/extensions/strings.md b/doc/extensions/strings.md index 116541a..38f4085 100644 --- a/doc/extensions/strings.md +++ b/doc/extensions/strings.md @@ -32,8 +32,8 @@ Optional. In the form of a period `.` followed by a required positive decimal di | --- | --- | --- | | `s` | N |
boolThe value is formatted as true or false.
intThe value is formatted in base 10 with a preceding - if the value is negative. Insignificant 0s must be excluded.
uintThe value is formatted in base 10. Insignificant 0s must be excluded.
doubleThe value is formatted in base 10. Insignificant 0s must be excluded. If there are no significant digits after the . then it must be excluded.
bytesThe value is formatted as if `string(value)` was performed and any invalid UTF-8 sequences are replaced with \ufffd. Multiple adjacent invalid UTF-8 sequences must be replaced with a single \ufffd.
stringThe value is included as is.
durationThe value is formatted as decimal seconds as if the value was converted to double and then formatted as %ds.
timestampThe value is formatted according to RFC 3339 and is always in UTC.
null_typeThe value is formatted as null.
typeThe value is formatted as a string.
listThe value is formatted as if each element was formatted as "%s".format([element]), joined together with , and enclosed with [ and ].
mapThe value is formatted as if each entry was formatted as "%s: %s".format([key, value]), sorted by the formatted keys in ascending order, joined together with , , and enclosed with { and }.
| | `d` | N |
intThe value is formatted in base 10 with a preceding - if the value is negative. Insignificant 0s must be excluded.
uintThe value is formatted in base 10. Insignificant 0s must be excluded.
| -| `f` | Y | `int` `uint` `double`: The value is converted to the style `[-]dddddd.dddddd` where there is at least one digit before the decimal and exactly `precision` digits after the decimal. If `precision` is 0, then the decimal is excluded. The value is rounded to the specified precision using the "round half to even" method (banker's rounding), where values exactly halfway between two numbers are rounded to the nearest even digit. -| `e` | Y | `int` `uint` `double`: The value is converted to the style `[-]d.dddddde±dd` where there is one digit before the decimal and `precision` digits after the decimal followed by `e`, then the plus or minus, and then two digits. | +| `f` | Y | `double`: The value is converted to the style `[-]dddddd.dddddd` where there is at least one digit before the decimal and exactly `precision` digits after the decimal. If `precision` is 0, then the decimal is excluded. The value is rounded to the specified precision using the "round half to even" method (banker's rounding), where values exactly halfway between two numbers are rounded to the nearest even digit. +| `e` | Y | `double`: The value is converted to the style `[-]d.dddddde±dd` where there is one digit before the decimal and `precision` digits after the decimal followed by `e`, then the plus or minus, and then two digits. | | `x` `X` | N | Values are formatted in base 16. For `x` lowercase letters are used. For `X` uppercase letters are used.
int uintThe value is formatted in base 16 with no insignificant digits. If the value was negative - is prepended.
stringThe value is formatted as if `bytes(value)` was used to convert the string to bytes and then each byte is formatted in base 16 with exactly 2 digits.
bytesThe value is formatted as if each byte is formatted in base 16 with exactly 2 digits.
| | `o` | N | `int` `uint`: The value is converted to base 8 with no insignificant digits. If the value was negative `-` is prepended. | | `b` | N | `int` `uint` `bool`: The value is converted to base 2 with no insignificant digits. If the value was negative `-` is prepended. |