Explicit ordering with std.format

Tomek Sowiński just at ask.me
Fri Dec 4 15:07:56 PST 2009


An extract from java.util.Formatter docs:

// Explicit argument indices may be used to re-order output.
formatter.format("%4$2s %3$2s %2$2s %1$2s", "a", "b", "c", "d")
// -> " d  c  b  a"

How do I achieve this with std.format? The ddocs only say that "variadic  
arguments are consumed in order". Any way to change that order?


Tomek


More information about the Digitalmars-d-learn mailing list