How to use `format` to repeat a character

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 11 03:32:11 PDT 2016


On Monday, 11 July 2016 at 10:23:24 UTC, Bahman Movaqar wrote:
> On 07/11/2016 02:44 PM, ketmar wrote:
>> On Monday, 11 July 2016 at 09:31:49 UTC, Ali Çehreli wrote:
>>> What makes you expect that format should have that feature? :)
>
> I somehow recalled I could do that in C and then there was the 
> "minimum field width" in the docs, so I thought it's possible 
> I'm just not understanding the docs clearly :-)

You can do it in D with custom format specifiers. See:

https://wiki.dlang.org/Defining_custom_print_format_specifiers


More information about the Digitalmars-d-learn mailing list