format a string like sprintf?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Tue Aug 16 07:28:05 PDT 2011
Is this what you're after?
import std.string;
void main()
{
auto str = format("%.4s", 4);
assert(str == "0004");
}
More information about the Digitalmars-d-learn
mailing list