My solutions is elegant and much simpler. It will trim all leading zeroes regardless of length. So, whether the input data is 000001234 or 000012345, it will still give you the correct output of 1234 or 12345. I would prefer the KISS method anyday!
Have a great day!