[OT] new thing I learned for today
Atila Neves
atila.neves at gmail.com
Wed Dec 18 12:30:48 UTC 2019
On Wednesday, 18 December 2019 at 01:20:33 UTC, Steven
Schveighoffer wrote:
> On 12/11/19 4:52 AM, Mike Parker wrote:
>> [...]
>
> BTW, people have been talking about usage like:
>
> auto str = i"I have $apples apples".format;
>
> And it got me thinking, does this actually work? I mean, can
> multiple parameters be used for UFCS?
>
> Answer: yes.
>
> auto str = AliasSeq!("I have %s apples", apples).format; // OK
>
> pretty cool. I had no idea.
Huh. I wrote my example without UFCS precisely because I didn't
know if that would work. Nice!
> -Steve
More information about the Digitalmars-d
mailing list