printZeroPad

ref
W
printZeroPad
(
C = char
W
I
)
(
scope return ref W w
,
const I c
,)
if (
isSomeChar!C &&
isIntegral!I
&&
!is(I == enum)
)

Examples

import mir.appender;
auto w = scopedBuffer!char;

w.printZeroPad(-123, 5);
w.put(' ');
w.printZeroPad(123, 5);

assert(w.data == "-0123 00123", w.data);

Meta