format a string like sprintf?

Steven Schveighoffer schveiguy at yahoo.com
Tue Aug 16 06:32:47 PDT 2011


On Tue, 16 Aug 2011 09:23:26 -0400, teo <teo.ubuntu at yahoo.com> wrote:

> What is the correct way in D to format a string like sprintf? I need to
> pad a number with zeroes. I tried to use std.format.format and
> std.string.format, but had some strange results.

I think maybe std.string.format?  I realize looking at the docs it's  
*woefully* underdocumented, but I think it works just like writefln or  
std.format.format but without the need for an output range.

-Steve


More information about the Digitalmars-d-learn mailing list