I have a number say 12345001 which needs to be parsed. Its a number that has no delimiters.I have to read the last three digits and then the rest of digits irrespective of the total length of the number. The digits then have to be swapped and changed to a fixed length. The fillers to be inserted are X.
In short the input is 12345001 and the output needed is 001XX12345. The total length has to be 10.
Please suggest a solution which is performance oriented because the input has to be read from a file that would have around 50K records in it.