Hi,
I have a
string which is a combination of a alpha prefix and a number suffix. I extract the prefix and get the number suffix of the string. Then, I do a Integer.parseInt on the suffix to get the value as an integer so that I can increment it. This works ok in general, but not when the suffix has leading zeros. In this case, I need to retain the leading zeros. So, for example, if the suffix is 001, when I parseInt it the integer value become 1 and then when I increment it, it becomes 2. I need it to be 001, 002.
Is there a way to do this?
Thanks in advance.