The only issue I have with your method is that it only works fine for left
padding numbers and does nothing for left aligning strings for fixed length
text.
I also think that is more readable when you implicitly call LeftPad or
RightPad, the intent is then known.
I do not believe that performance is an issue here. I am sure that format()
and padleft(), padright() are using similar cycles and resources under the
hood.
Semantical "Correctness" is completing a thought and implicitly stating the
understood.
"you, go to the store." is more correct than "Go to the store." as the
ladder has the understood you in it.
I think that int.tostring.padleft(10,"0") is more correct than
int.tostring("0000000000") as the ladder is understood to be padleft.
At the end of the day though, it is all about preference. Certainly a do
while loop can achieve the same results.