How to use sprintf

Adam D. Ruppe destructionator at gmail.com
Sun Apr 24 14:31:11 PDT 2011


You might try the format() function instead:

http://dpldocs.info/std.string.format

Though, I don't think it does thousands grouping, so it might not
work for you.

If you need C's sprintf, make sure the strings are zero terminated
and that you're passing pointers to them:

char[10] buffer;

sprintf(buffer.ptr, toStringz(formatString), args...);


More information about the Digitalmars-d mailing list