On Wednesday, 15 April 2015 at 19:16:55 UTC, Steven Schveighoffer
wrote:
On 4/15/15 3: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");
This would be consistent with the writeln interface, and it
could also
reduce the syntax overhead of using appenders vs string
concats.
Was this overlooked or is there some issue I am not seeing? :)
Cheers,
-M
What about:
import std.format;
app.formattedWrite("foo%sbar", var);
-Steve
Well, but wouldn't that incur the cost of parsing the format
string, for no benefit?