What's the best way to remove all occurrences of a single character from a string?
right now I'm using this technique:
Public Function remChar(s As String, c As String) As String
Dim varr As Variant
varr = Split(s, c)
remChar = Join(varr, ""
End Function
where s is the original string and c is the character I'm trying to remove.
This works fine, but I was wondering about more elegant solution. Any suggestions?
-Venkman
right now I'm using this technique:
Public Function remChar(s As String, c As String) As String
Dim varr As Variant
varr = Split(s, c)
remChar = Join(varr, ""
End Function
where s is the original string and c is the character I'm trying to remove.
This works fine, but I was wondering about more elegant solution. Any suggestions?
-Venkman