String replace

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Seema Multani

    #1

    String replace

    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


  • IdleBrain

    #2
    Re: String replace


    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

    Comment

    Working...