diff options
author | git <[email protected]> | 2022-05-05 05:05:04 +0900 |
---|---|---|
committer | git <[email protected]> | 2022-05-05 05:05:04 +0900 |
commit | 4f25971f058fa89bcea61f6296f71c30122b2f22 (patch) | |
tree | ff328bfe183722209519d48160d87fe7a1b1b047 /doc/format_specifications.rdoc | |
parent | 197f9e9d42559cd3219d1376414536fc471a572b (diff) |
* remove trailing spaces. [ci skip]
Diffstat (limited to 'doc/format_specifications.rdoc')
-rw-r--r-- | doc/format_specifications.rdoc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/format_specifications.rdoc b/doc/format_specifications.rdoc index 323d6c9e0b..7157220c08 100644 --- a/doc/format_specifications.rdoc +++ b/doc/format_specifications.rdoc @@ -164,7 +164,7 @@ if the integer is longer than the precision: sprintf('%.3d', 1) # => "001" sprintf('%.3d', 1000) # => "1000" - + # If the precision is 0 and the value is 0, nothing is written sprintf('%.d', 0) # => "" sprintf('%.0d', 0) # => "" @@ -184,10 +184,10 @@ the number of significant digits to be written: sprintf('%.2g', 123.45) # => "1.2e+02" sprintf('%.3g', 123.45) # => "123" sprintf('%.10g', 123.45) # => "123.45" - + # With no precision specifier, defaults to 6 significant digits. sprintf('%g', 123.456789) # => "123.457" - + For the +s+, +p+ specifiers, the precision specifies the number of characters to write: |