Preliminary submission - std.rational and std.typelist

Philippe Sigaud philippe.sigaud at gmail.com
Sun Oct 7 08:24:36 PDT 2012


On Sun, Oct 7, 2012 at 11:15 AM, Dmitry Olshansky <dmitry.olsh at gmail.com> wrote:
> import std.stdio, std.format;
>
> struct A{
>         int k;
>
>         void toString(scope void delegate(const(char)[]) sink)
>         {
>                 formattedWrite(sink, "[%d]", k);
>         }
> }

I see, thanks. And if the string in formattedWrite is a complex beast,
created through lots of if's and while's, I use Appender in its place?


More information about the Digitalmars-d mailing list