An OutputRange for accepting possibly piecewise segments of the formatted string.
A format string specifying the output format.
"d" | Decimal |
"o" | Octal |
"x" | Hexadecimal, lower case |
"X" | Hexadecimal, upper case |
"s" | Default formatting (same as "d") |
null | Default formatting (same as "d") |
toString is rarely directly invoked; the usual way of using it is via std.format.format:
import std.format : format; auto x = BigInt("1_000_000"); x *= 12345; assert(format("%d", x) == "12345000000"); assert(format("%x", x) == "2_dfd1c040"); assert(format("%X", x) == "2_DFD1C040"); assert(format("%o", x) == "133764340100");
Convert the BigInt to string, passing it to the given sink.