The OpenD Programming Language

printZeroPad

void
printZeroPad
(
C = char
W
I
)
(
scope ref W w
,
const I c
,)
if (
!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");

Meta