The type of prefix used along with the symbol.
The spacing between the value and the unit.
The symbol of the size unit.
The name of the size unit (singular).
The name of the size unit (plural).
Whether to use the name of the symbol if there is no prefix.
enum Config config = { symbol: "O", unitName: "octet", unitNamePlural: "octets", prefixUse: PrefixUse.IEC, useNameIfNoPrefix: true }; alias MySize = SizeBase!config; assert("%4.1f".format(MySize(0)) == " 0 octet"); assert("%4.1f".format(MySize(1)) == " 1 octet"); assert("%4.1f".format(MySize(42)) == " 42 octets"); assert("%4.1f".format(MySize(1024)) == " 1.0 KiO"); assert("%4.1f".format(MySize(2_590_000)) == " 2.5 MiO");
Configuration of size format.