This one could help you for integer values:
or this one, achieving the same:
so 888 will give 00888 printed out, I assume, this is what you want to achieve?
EDIT: not really sure any more, but if you just want to print the number of digits given by an int, this works the same, provided you have a long enough base string.