When I use printf like this:
printf("%.*ju ", size_length, (uintmax_t) thing->fts_statp->st_size);
It adds leading zeroes to make thing->fts_statp->st_size the length size_length (which is somewhat acceptable because its the right size, but visually unappealing). Is there a way to print size information with printf that doesn't do this?
EDIT for more information:
Currently it prints like this:
00012
00234
51234
01203
00001
I'd like it to print
12
234
51234
1203
1
If you just want space padding:
printf("% *ju ", size_length, (uintmax_t) thing->fts_statp->st_size);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With