String val = "98"
I need to get the output as 0000098 (7 digits).
0000098
I need left padding of zeros to the string or integer value...
The number stored in val is dynamic and may contain any number of digits, but the output should always be 7 digits.
In groovy, you can pad Strings like so:
val.padLeft( 7, '0' )
That will pad the left of the string with zeros until it is 7 chars in length