Change 4th last character of string

Hello all,

I am trying to change the 4th last character in a string.
str = “100,100”
outstr = “100.100”
I want to only change the , to a . but I can’t use replace because if the number is 1,100,100 then it will change both of the commas.

How can I do this?

1 Like

“100,000,00”.Remove(3,1).Insert(3,“.”)

you can try this!
@dvn

1 Like

Hi @dvn,

Pls try like this
input=“100,100”
output=input.Replace(“,”,“.”).Substring(0,4)+input.Substring(4,input.Length-4)