www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Formatted output not on screen but in a string

reply Alain De Vos <devosalain ymail.com> writes:
Next code format a string and prints it.
But I want the formatted string stored in a string
```
//Decimal place separator %,
writefln!"%,s"(123456789);
//123,456,789
```
May 21
parent Adam D. Ruppe <destructionator gmail.com> writes:
On Friday, 21 May 2021 at 22:37:34 UTC, Alain De Vos wrote:
 Next code format a string and prints it.
 But I want the formatted string stored in a string
 ```
 //Decimal place separator %,
 writefln!"%,s"(123456789);
 //123,456,789
 ```
std.format.format
May 21