Function rduplicatestring(ByVal str As String) As String
rduplicatestring = ""
Dim myarr() As String = Split(str, Space(1))
myarr = myarr.Distinct().ToArray
myarr = myarr.DefaultIfEmpty().ToArray
rduplicatestring = Replace(Join(myarr, Space(1)), Space(2), Space(1))
Return rduplicatestring
End Function
rduplicatestring = ""
Dim myarr() As String = Split(str, Space(1))
myarr = myarr.Distinct().ToArray
myarr = myarr.DefaultIfEmpty().ToArray
rduplicatestring = Replace(Join(myarr, Space(1)), Space(2), Space(1))
Return rduplicatestring
End Function
No comments:
Post a Comment