VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This function replaces every instance of a certain within a string to any character you wish. (For

by TerranRiCH (5 Submissions)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 26th July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This function replaces every instance of a certain within a string to any character you wish. (For example, change all the F's to T's in

Rate This function replaces every instance of a certain within a string to any character you wish. (For



    ReplaceString = ""
    For i = 1 To Len(StringToUse)
        If Mid(StringToUse, i, 1) = CharacterToSearch Then
            ReplaceString = ReplaceString & ReplacementCharacter
        Else
            ReplaceString = ReplaceString & Mid(StringToUse, i, 1)
        End If
    Next i
End Function

Download this snippet    Add to My Saved Code

This function replaces every instance of a certain within a string to any character you wish. (For Comments

No comments have been posted about This function replaces every instance of a certain within a string to any character you wish. (For . Why not be the first to post a comment about This function replaces every instance of a certain within a string to any character you wish. (For .

Post your comment

Subject:
Message:
0/1000 characters