by Sathyanarayanan.k (3 Submissions)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 13th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Replace the string with the given character
Dim iCount As Integer
Dim sInput As String
sInput = vsInput
iCount = InStr(sInput, vsReplace)
While iCount
sInput = Left$(sInput, iCount - 1) & vsWith & Right$(sInput, Len(sInput) - iCount)
iCount = InStr(sInput, vsReplace)
Wend
Replace = sInput
End Function