Replace the third character

Hi All,

I have a input as : 050
I want the output as 05o

I want to replace the third character alone as o
Suggest me plz

Thanks…

@vaishali Replace with what?

Hi Pravin,

Zero to o.
If there o already no need to replace it

@vaishali - Only if its 0 replace it with o right?

what abt 058? or 05A?

@vaishali

variable1 as String

variable1.Remove(2,1).Insert(2,“NewValue”)

It will replace whatever you have at third position as 2 is index of character at third position

Thanks Pravin…it’s working

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.