X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fdocs%2FFormat.md;h=74192058abc00c496fae81e0367c83feaeae1b6d;hb=ff878dc12e3f7d7234f21b0b4b3251595c031b4c;hp=5696c8be0b28d150201c24d1a8a5e38f12de91d4;hpb=4460753ff370dce64791167e2afd3824ea6a1c57;p=folly.git diff --git a/folly/docs/Format.md b/folly/docs/Format.md index 5696c8be..74192058 100644 --- a/folly/docs/Format.md +++ b/folly/docs/Format.md @@ -124,7 +124,7 @@ Format string (`vformat`): - `format_spec`: format specification, see below Format specification: -`[[fill] align] [sign] ["#"] ["0"] [width] [","] ["." precision] [type]` +`[[fill] align] [sign] ["#"] ["0"] [width] [","] ["." precision] ["."] [type]` - `fill` (may only be specified if `align` is also specified): pad with this character ('` `' (space) or '`0`' (zero) might be useful; space is default) @@ -149,6 +149,8 @@ Format specification: - for floating point values, number of digits after decimal point ('`f`' or '`F`' presentation) or number of significant digits ('`g`' or '`G`') - for others, maximum field size (truncate subsequent characters) +- '`.`' (when used after precision or in lieu of precison): Forces a trailing + decimal point to make it clear this is a floating point value. - `type`: presentation format, see below Presentation formats: @@ -189,4 +191,3 @@ You can extend `format` for your own class by providing a specialization for `folly::FormatValue`. See `folly/Format.h` and `folly/FormatArg.h` for details, and the existing specialization for `folly::dynamic` in `folly/dynamic-inl.h` for an implementation example. -