import std.conv : to; import std.format : format; import std.uni : unicode; // This was originally using Cyrillic script. // Unfortunately this is a pretty active range for changes, // and hence broke in an update. // Therefore the range Basic latin was used instead as it // unlikely to ever change. assert(unicode.InBasic_latin.to!string == "[0..128)"); // The specs '%s' and '%d' are equivalent to the to!string call above. assert(format("%d", unicode.InBasic_latin) == unicode.InBasic_latin.to!string); assert(format("%#x", unicode.InBasic_latin) == "[0..0x80)"); assert(format("%#X", unicode.InBasic_latin) == "[0..0X80)");
Obtain a textual representation of this InversionList in form of open-right intervals.
The formatting flag is applied individually to each value, for example: