? toString(?)

simendsjo simen.endsjo at pandavre.com
Thu Jun 9 08:38:15 PDT 2011


Object contains toString as the following:
string toString();

But there are also other versions going about:
void toString(void delegate(const(char)[]) sink, string fmt);
void toString(void delegate(const(char)[]) sink, FormatSpec fmt);

I wouldn't be surprised to see some range based version too.
Where are the different versions required, and what is best practice 
when implementing toString?


More information about the Digitalmars-d-learn mailing list