On 04/15/2015 12:09 PM, "=?UTF-8?B?Ik3DoXJjaW8=?= Martins\" <[email protected]>\"" wrote:
Hi!

I use Appender a lot, and find it ugly to write this all the time to
efficiently construct strings:

app.put("foo");
app.put(var);
app.put("bar");

How about this instead?

app.put("foo", var, "bar");

Agreed.

If a different name like putAll() is acceptable:

void putAll(A, T...)(A a, T items)
{
    foreach (item; items){
        a.put(item);
    }
}

// ...

    app.putAll("foo", var, "bar");

Ali

Reply via email to