Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim stringg, length, newstring, replace, initial, pos, first, second As String
- stringg = txtSentence.Text
- replace = txtSecond.Text
- initial = txtFirst.Text
- length = txtFirst.Text.Length
- pos = stringg.IndexOf(initial)
- first = stringg.Substring(0, pos)
- second = stringg.Substring(stringg, length + pos)
- newstring = first & replace & second
- txtResult.Text = newstring
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement