About string and int spliced together.
Kagamin
spam at here.lot
Thu Jun 18 11:00:19 UTC 2020
On Thursday, 18 June 2020 at 10:19:25 UTC, JN wrote:
> On Thursday, 18 June 2020 at 09:44:15 UTC, Kagamin wrote:
>> You can use https://dlang.org/phobos/std_conv.html#text
>> string s = text("My name is ", name, " and my age is ", age,
>> ".");
>
> That looks actually quite nifty, I'll have to use that someday.
> Still it requires an import for std.conv, and when you import
> std.conv you might as well just to!string all the way.
`text` function is shorter, it's close to interpolated string in
ergonomics while not being interpolated string.
More information about the Digitalmars-d
mailing list