今天有人在CSDN提问:
abc,123,aac,abc,aac,1234
如何把上边的字符串去掉重复的部分,变成
abc,123,aac,1234

解决方法如下:
<%
str="abc;123;aac;abc;1234;123;"
arrayList=split(str,";")
For i=0 To Ubound(arrayList)
   If InStr(str,arrayList(i))<>InstrRev(str,arrayList(i)) Then
    If InStr(NewStr,","&arrayList(i)&"")<1 Then NewStr=NewStr&","&arrayList(i)
   Else
    NewStr=NewStr&","&arrayList(i)
   End If
Next
If Left(NewStr,1)="," Then NewStr=Right(NewStr,Len(NewStr)-1)
Response.Write NewStr
%>


相关文章:

  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-07-08
猜你喜欢
  • 2021-11-24
  • 2021-07-05
  • 2021-06-09
  • 2021-12-30
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案