去掉数组重复项并去掉多余的分隔符
'**************************************************** '函数名:FormatReArray '作 用:去掉数组重复项目,去掉数组内多余的分隔符 '参 数:str 需要进行进行处理的数组 ' sep 数组分隔符 '返回值:ShowInfo 输出参数 为一个二维数组,数组的第一项为是否取到数据,如果有数据则为大于0的数字,否则为0 。参数一次类推为字段 '作 者:飞飞 QQ:276230416 '**************************************************** function FormatReArray(str,sep) dim temp,i,Arraytemp temp="" Arraytemp=split(str,sep) for i=0 to ubound(Arraytemp) if Arraytemp(i)<>"" then if instr(temp&sep,Arraytemp(i)&sep)=0 then temp=temp&Arraytemp(i)&sep end if next FormatReArray=left(temp,len(temp)-1) end function 例子:Call FormatReArray(",,,1,2,,1,,2,3",",") 结果:1,2,3
|