[Issue 19982] padLeft usability issues
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 19 16:21:10 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19982
--- Comment #2 from Stephen Grammer <sgrammer at economicmodeling.com> ---
Thanks! I missed leftJustify. That is exactly what I need. If you are planning
to add more asserts to document the behavior of padLeft, maybe consider adding:
-------------------------------------------------------
// implicitly converts to a range of uint when padding dchar[] with char
static assert(is(ElementType!(typeof("string".padLeft('0', 10))) == uint));
static assert(is(ElementType!(typeof("string".padLeft(dchar('0'), 10))) ==
dchar));
--
More information about the Digitalmars-d-bugs
mailing list