All asserts fail, while with %d they work. unittest { assert(format!"%+b"(15) == "+1111"); assert(format!"%+o"(15) == "+17"); assert(format!"%+x"(15) == "+f"); assert(format!"%+X"(15) == "+F"); assert(format!"% b"(15) == " 1111"); assert(format!"% o"(15) == " 17"); assert(format!"% x"(15) == " f"); assert(format!"% X"(15) == " F"); }
Meanwhile I think, this is intentional: These format characters give the image of the bit pattern, which means, there is no sign. So closing this as invalid.