F
Friedrich Clausen
Hello All,
I want to print some integers in a zero padded fashion, eg. :
Testing 0001
but the padding needs to be dynamic eg. sometimes %05i, %02i or some
other padding amount. But I can't insert a variable into the format
specification to achieve the desirable padding.
I would be much obliged if someone can give me some tips on how to
achieve a variably pad a number.
Cheers,
Fred.
Thanks,
Fred.
I want to print some integers in a zero padded fashion, eg. :
Testing 0001
but the padding needs to be dynamic eg. sometimes %05i, %02i or some
other padding amount. But I can't insert a variable into the format
specification to achieve the desirable padding.
I would be much obliged if someone can give me some tips on how to
achieve a variably pad a number.
Cheers,
Fred.
Thanks,
Fred.