How to make a formatted string ?

Gabriel Laskar gabriel at
Wed Mar 17 04:59:20 PDT 2010


I am searching how to do a formatted string like with sprintf()

I have found std.format.formattedWrite() but when I try :

Appender!(string) msg;
formattedWrite(msg, "toto: %0", 42);

It fails with :
core.exception.RangeError@�(1582): Range violation

I have also found std.string.format, but it seems to fail also.

More information about the Digitalmars-d-learn mailing list