Correctness is in the eye of the beholder. Since the original author said:
then converted back to number by adding 0.then nobull's implementation is a smidgeon faster than yours since nobull's implementation doesn't need to undergo the extra string to number transformation that yours does. Even if the speed difference is nil, nobull's implementation is also conceptually what zentara wanted, as implied by the "adding 0" bit above.
In reply to Re^3: zero padding
by Tanktalus
in thread zero padding
by zentara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |