D string interpolation

mw mingwu at gmail.com
Sun Oct 4 16:27:59 UTC 2020


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}"));
```



More information about the Digitalmars-d mailing list