@safe unittest
{
auto cmp = " 123,456";
assert(cmp.length == 12, format("%d", cmp.length));
auto tmp = format("%12,d", 123456);
assert(tmp.length == 12, format("%d", tmp.length));
assert(tmp == cmp, "'" ~ tmp ~ "'");
}
The length of tmp should be 12, but it is 11.
Does not depend on number type. The error also occurs with floats.
Comment #1 by github-bugzilla — 2017-12-09T17:30:43Z