Sum String starting with zero

i have to sum A=‘0005’ + 1.
i want as result ‘0006’ but i obtain 6


for this you could work on string base after calculation and fill up the string with zeros.

But the A string can start with a variable number of zero…
it is not always the same

PadLeft fills up the missing characters till it reached the specified length, so dynamic length should not be the problem. Also the statement can be used like this

I have not specific length.
i have to sum 0005+1 or 003+1 or 00000000045+1…

Yes, so the dynamic length was covered with StringA.Length

If do you feel that your requirement is not covered by the suggestion, so just give a try on a sample sequence or let us know more details:

  • from where you retrieved the different strings of different length
  • what is the exact code for summing up (statement, uiPath activity)

And we will help you on this