a function like writeln that returns a string rather than writes to a file
H. S. Teoh
hsteoh at quickfur.ath.cx
Sat May 2 02:29:43 UTC 2020
On Sat, May 02, 2020 at 02:22:42AM +0000, dan via Digitalmars-d-learn wrote:
> I'm looking for a function something like writeln or write, but instead of
> writing to stdout, it writes to a string and returns the string.
[...]
import std.format : format;
string str = format("%s %s %s", obj1, obj2, obj3);
T
--
Once bitten, twice cry...
More information about the Digitalmars-d-learn
mailing list