Output range to write to.
A std.format.FormatSpec which controls how the number is displayed.
std.format.FormatException if the format specifier is not one of 'd', 'x', 'X', 's'.
toString is rarely directly invoked; the usual way of using it is via std.format.format:
import std.format : format; assert(format("%s", Int128.max) == "170141183460469231731687303715884105727"); assert(format("%s", Int128.min) == "-170141183460469231731687303715884105728"); assert(format("%x", Int128.max) == "7fffffffffffffffffffffffffffffff"); assert(format("%X", Int128.max) == "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"); assert(format("%032X", Int128(123L)) == "0000000000000000000000000000007B"); assert(format("%+ 40d", Int128(123L)) == " +123"); assert(format("%+-40d", Int128(123L)) == "+123 ");
Also can format as wchar or dchar.
import std.conv : to; assert(to!wstring(Int128.max) == "170141183460469231731687303715884105727"w); assert(to!dstring(Int128.max) == "170141183460469231731687303715884105727"d);
Formats Int128 with either %d, %x, %X, or %s (same as %d).