String replace

  • Thread starter Thread starter Seema Multani
  • Start date Start date
S

Seema Multani

I have a string "56789916" I want to replace last digit of this string from
6 to 0. i.e "56789910". How can I do that.

Thanks in advance
 
Hello Seema,
Easiest solution if you donot want to convert the string back to int
is:

str = str.Remove(str.Length - 1, 1) & "0"

Hope it helps
 
Back
Top