Format a string value according to the requirement

Hi,

We have a requirement to generate a document which contains some information of a user that needs to be encoded by the guidelines provided. We need to format the value in such a way that it's length remains fixed always which is provided to us. So any value which has less digits than the required number of digits should be formatted like for eg: If the input is 1250000 and the max limit is 20, then it should be encoded as 00000000000001250000.

How can we do that, thanks in advance.

  Discussion posts and replies are publicly visible