- Home
·
- String Manipulation
·
- Function to remove all occurrences of a string inside another string. Even allows you to do a case
Function to remove all occurrences of a string inside another string. Even allows you to do a case
Function to remove all occurrences of a string inside another string. Even allows you to do a case sensitive comparison.
Rate Function to remove all occurrences of a string inside another string. Even allows you to do a case
(2(2 Vote))
'Removes all occurences of strRemove from pStr
'ignoreCase tells us to ignore the case when making comparisons
On Error GoTo RemoveStringERR
Dim opStr As String
Dim c As New Collection
Dim s As New clsStringAnalyser
Dim res As Variant
If IsMissing(ignoreCase) Then
ignoreCase = True
End If
c.Add strRemove
res = s.PopWord(pStr, ignoreCase, c)
Do While Not IsNull(res)
opStr = opStr + res
res = s.PopWord()
Loop
RemoveString = opStr
RemoveStringEXIT:
Exit Function
RemoveStringERR:
RemoveString = Null
Err.Raise (Err.Number)
Resume RemoveStringEXIT
End Function
Function to remove all occurrences of a string inside another string. Even allows you to do a case Comments
No comments yet — be the first to post one!
Post a Comment