DIP 1027--String Interpolation--Final Review Discussion Thread

Steven Schveighoffer schveiguy at gmail.com
Tue Feb 4 21:59:18 UTC 2020


On 2/4/20 2:12 AM, Walter Bright wrote:
> On 2/3/2020 5:06 PM, Jonathan Marler wrote:
>> Some applications want the "Strings and Expressions" form rather than 
>> the "Format String" form.
> 
> To have "strings and expressions" then write it that way:
> 
>      foo("I want ", i, " bananas");

To have "formatted string output", just write it that way:

writefln("I have %s apples and %d bananas", apples, bananas);

-Steve


More information about the Digitalmars-d mailing list