DIP 1027---String Interpolation---Community Review Round 1

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Wed Dec 11 14:16:54 UTC 2019

On Wednesday, 11 December 2019 at 13:57:20 UTC, Ola Fosheim 
Grøstad wrote:
> If you want it simple: add tuples. You either get something 
> that can be turned into a string or you get a tuple, if you get 
> a tuple then the first item in the tuple is a formatter and the 
> rest is data.

You could use «,» to indicate a formatter like this:

f"This is  {"my money"}:  {dec(3,2), my_account}!"


("This is ", "my money", ": ", ( dec(3,2), my_account ), "!")

More information about the Digitalmars-d mailing list