Hi,

i have to sum A=‘0005’ + 1.

i want as result ‘0006’ but i obtain 6

Thanks

Hi,

i have to sum A=‘0005’ + 1.

i want as result ‘0006’ but i obtain 6

Thanks

@white72

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

yourStringVar.PadLeft(4,"0"c)

But the A string can start with a variable number of zero…

it is not always the same

@white72

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

yourStringVar.PadLeft(StringA.Length,"0"c)

I have not specific length.

i have to sum 0005+1 or 003+1 or 00000000045+1…

@white72

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

yourStringVar.PadLeft(**StringA.Length**,"0"c)

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