When to prefer formatValue over formattedWrite?
Per Nordlöw
per.nordlow at gmail.com
Tue Feb 19 11:40:09 UTC 2019
Is `formatValue` also preferred over `formattedWrite` when
writing a single value?
Code example:
import std.array : appender;
auto writer1 = appender!string();
writer1.formattedWrite("%08b", 42);
auto writer2 = appender!string();
auto f = singleSpec("%08b");
writer2.formatValue(42, f);
Is `formatValue` more lightweight to the compiler?
More information about the Digitalmars-d-learn
mailing list