Bug 8574 – [std.format] The flag ' ' works for floating numbers, not only for integers

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-08-21T08:32:00Z
Last change time
2013-02-05T12:58:45Z
Keywords
pull
Assigned to
nobody
Creator
liremn

Comments

Comment #0 by liremn — 2012-08-21T08:32:49Z
In the document of std.format of Phobos (http://dlang.org/phobos/std_format.html), it is written that the flag ' ' only affects "integral ('d')" in the table describing the formatting flags, but it seems that it also works for floating numbers, or even BigInt (with "% d" or "% s"). So I suppose the last row of the table should be: ' ' / numeric / Prefix positive numbers in a signed conversion with a space.
Comment #1 by k.hara.pg — 2012-08-21T08:47:46Z
Pull request: https://github.com/D-Programming-Language/phobos/pull/755 > or even BigInt (with "% d" or "% s"). BigInt supports its formatting by the std.format module correctly, so this is correct behavior.
Comment #2 by github-bugzilla — 2012-08-27T01:44:14Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/b7df920554f1c53313740f33aa762342e38fa00c fix Issue 8574 - [std.format] The flag ' ' works for floating numbers, not only for integers https://github.com/D-Programming-Language/phobos/commit/0a511e3975e7c0e4b05c5bff56728ba0263c77fe Merge pull request #755 from 9rnsr/fix8574 Issue 8574 - [std.format] The flag ' ' works for floating numbers, not only for integers