format a string like sprintf?
Steven Schveighoffer
schveiguy at yahoo.com
Tue Aug 16 07:09:36 PDT 2011
On Tue, 16 Aug 2011 09:32:47 -0400, Steven Schveighoffer
<schveiguy at yahoo.com> wrote:
> 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.
bleh, disregard that. I only read that you tried std.format.format, I
didn't realize you already tried std.string.format.
I agree with bearophile, post your "strange results"
-Steve
More information about the Digitalmars-d-learn
mailing list