D string interpolation

mw mingwu at gmail.com
Sun Oct 4 16:36:10 UTC 2020


On Sunday, 4 October 2020 at 16:31:50 UTC, Imperatorn wrote:
> On Sunday, 4 October 2020 at 16:27:59 UTC, mw wrote:
>> On Sunday, 4 October 2020 at 13:16:53 UTC, Imperatorn wrote:
>>> Are there any easy ways to achieve string interpolation in D 
>>> a la $"Hello {adjective} world"?
>>
>> I also have one:
>>
>> https://code.dlang.org/packages/jdiutil
>>
>> ```
>>         // multiple vars separated by ';'
>>         // _S with var name; _s without var name
>>         writeln(mixin(_S!"with    var name: {i; d; 
>> thePoint}"));
>>         writeln(mixin(_s!"without var name: {i; d; 
>> thePoint}"));
>> ```

multiple vars separated by ';'

because, you can also pass in `funcCAll(arg, arg2)`




More information about the Digitalmars-d mailing list