So I have been working on a naming convention which add 0\'s before a string. I\'m trying to do this the short handed way before breaking everything into if statements. Here
How about this?
("00000" + numberAsString).substring(numberAsString.length())
This will only work if you have 5 or less digit numbers.
Ideone link to check code
Reference
To be honest, I also think 4 times how this code works, but after understanding I posted as this is something out of the box.