How can I format string to ensure that it is shown as:
ID:12 SIZE:235235235235
ID:1455 SIZE:335235
Instead of:
ID:12 SIZE:235235235235
ID:1455 SIZE:335235
Tabs do NOT work in all cases, they only help with this if the length variance is +/- 4-5 characters.
Is there something equivalent to Padding(VB) in C?
When you print something with
printf, you can specify a field width; the value is justified in the field. For example:will right-justify the id in a 5-character field, and the size in a 10-character field.