ASP 如何判断数组有无重复 10
AFSFSGWEQAGGQWEGSADGDSAREGQAREBBBBEFGWEQAREGQEBBBBERGA假设有这么多字符,把它放到数组里面,怎样才能判断里面有没有重复...
AFSFS
GWEQAG
GQWEG
SADGDSA
REGQARE
BBBB
EFGWEQA
REGQE
BBBB
ERGA
假设有这么多字符,把它放到数组里面,怎样才能判断里面有没有重复的数据? 展开
GWEQAG
GQWEG
SADGDSA
REGQARE
BBBB
EFGWEQA
REGQE
BBBB
ERGA
假设有这么多字符,把它放到数组里面,怎样才能判断里面有没有重复的数据? 展开
1个回答
展开全部
Function FormateOrderBy(OrderByText)
Dim tmp,tmp2,i,j
tmp3 = ""
tmp = Split(OrderByText," ")
For i=0 To Ubound(tmp)-1
For j=i+1 To Ubound(tmp)
If UCase(Trim(tmp(i)))=UCase(Trim(tmp(j))) Then
tmp(j)=""
End If
Next
Next
tmp2=""
For i=0 To Ubound(tmp)
If tmp(i) <>"" Then tmp2 = tmp2 & tmp(i) & " "
Next
FormateOrderBy = Left(tmp2,Len(tmp2)-1)
End function
Dim tmp,tmp2,i,j
tmp3 = ""
tmp = Split(OrderByText," ")
For i=0 To Ubound(tmp)-1
For j=i+1 To Ubound(tmp)
If UCase(Trim(tmp(i)))=UCase(Trim(tmp(j))) Then
tmp(j)=""
End If
Next
Next
tmp2=""
For i=0 To Ubound(tmp)
If tmp(i) <>"" Then tmp2 = tmp2 & tmp(i) & " "
Next
FormateOrderBy = Left(tmp2,Len(tmp2)-1)
End function
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询