On Wednesday, 7 April 2021 at 17:31:09 UTC, Paul Backus wrote:
On Wednesday, 7 April 2021 at 17:04:56 UTC, novice2 wrote:
On Wednesday, 7 April 2021 at 13:43:18 UTC, Paul Backus wrote:
So, you should change your code to

    writefln("%-(%s, %)", s);

sorry i dont read docs so carefully
thanks

It's not your fault--this is a pretty obscure feature, and it's not documented very well. Even after you've found the correct page in the documentation (the page for `formattedWrite` [1]), you have to scroll down past multiple examples to find the text that explains it.

[1] https://dlang.org/phobos/std_format.html#formattedWrite

I have created a pull request that will hopefully make this more prominent on the doc page:
https://github.com/dlang/phobos/pull/7944

Reply via email to