数组去重复[vbs]
Function quchongfu(srcstr,ig,sp)
Dim objDict,x,y
srcarr=split(Trim(srcstr),sp)
Set objDict=createobject("Scripting.Dictionary")
For Each x In srcArr
If x<>"" Then
If ig=True Then
y=LCase(x)
Else
y=x
End If
If Not objDict.Exists(y) Then objDict.Add x,y
End If
Next
x=Join(objDict.Items,sp)
If Right(x,1)=sp Then
quchongfu=left(x,Len(x)-1)
Else
quchongfu=x
End If
Set objDict=Nothing
End Function
MsgBox quchongfu("aaa,sss,,,AAA,ccc,aaa,AAA,ZZZ,ssssss,,",true,",")