
<%
'******************************
'函數:MoveR(Rstr)
'參數:Rstr,以逗號做分隔的數組
'描述:去除數組中重復的項
'示例:MoveR("1,2,2,2,3,3,4,a,45,5,6,6")
'******************************
Function MoveR(Rstr)
Dim i,SpStr
SpStr = Split(Rstr,",")
For i = 0 To Ubound(Spstr)
If I = 0 then
MoveR = MoveR & SpStr(i) & ","
Else
If instr(MoveR,SpStr(i))=0 and i=Ubound(Spstr) Then
MoveR = MoveR & SpStr(i)
Elseif instr(MoveR,SpStr(i))=0 Then
MoveR = MoveR & SpStr(i) & ","
End If
End If
Next
End Function
xxxlei = "1,2,2,2,3,3,4,a,45,5,6,6"
response.write "原來的:" & xxxlei
response.write "處理過的:" & MoveR(xxxlei)
%>
您發布的評論即表示同意遵守以下條款:
一、不得利用本站危害國家安全、泄露國家秘密,不得侵犯國家、社會、集體和公民的合法權益;
二、不得發布國家法律、法規明令禁止的內容;互相尊重,對自己在本站的言論和行為負責;
三、本站對您所發布內容擁有處置權。