婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > asp 數(shù)組 重復(fù)刪除函數(shù)(腳本之家增強(qiáng)版)

asp 數(shù)組 重復(fù)刪除函數(shù)(腳本之家增強(qiáng)版)

熱門(mén)標(biāo)簽:長(zhǎng)沙防封電銷(xiāo)卡品牌 地圖標(biāo)注服務(wù)哪家好 西寧公司外呼系統(tǒng)平臺(tái) 地圖標(biāo)注宅基地 武漢營(yíng)銷(xiāo)電話機(jī)器人軟件 智能電銷(xiāo)機(jī)器人適用于哪些行業(yè) 外呼系統(tǒng)還用卡么 騰訊地圖標(biāo)注商戶關(guān)閉 徐州人工智能電銷(xiāo)機(jī)器人好用嗎

因?yàn)橐獙?xiě)個(gè)東西用到,所以百度了一下,居然有朋友亂寫(xiě),而且比較多,都沒(méi)有認(rèn)真測(cè)試過(guò),只對(duì)字符可以,但是對(duì)數(shù)字就不可以,而且通用性很差,需要修改才可以真正使用。沒(méi)辦法就自己寫(xiě)了,經(jīng)過(guò)測(cè)試完全沒(méi)有問(wèn)題,而且思路很方便,代碼很短,如下:

復(fù)制代碼 代碼如下:

%
function cxarraynull(cxstr1,cxstr2)
if isarray(cxstr1) then
cxarraynull = "對(duì)不起,參數(shù)1不能為數(shù)組"
Exit Function
end if
if cxstr1 = "" or isempty(cxstr1) then
cxarraynull = "nodate"
Exit Function
end if
ss = split(cxstr1,cxstr2)
cxs = cxstr2ss(0)cxstr2
sss = cxs
for m = 0 to ubound(ss)
cc = cxstr2ss(m)cxstr2
if instr(sss,cc)=0 then
sss = sssss(m)cxstr2
end if
next
cxarraynull = right(sss,len(sss) - len(cxstr2))
cxarraynull = left(cxarraynull,len(cxarraynull) - len(cxstr2))
end Function
%>

使用方法和函數(shù)表示:
1、cxarraynull(cxstr1,cxstr2)函數(shù)中的兩個(gè)參數(shù):
cxstr1:要檢測(cè)的數(shù)組變量,可以為空,或其它未知的錯(cuò)誤數(shù)據(jù),當(dāng)為空或則為錯(cuò)誤數(shù)據(jù)返回"nodate"。
cxstr2:數(shù)組的分割符號(hào),可以為空,或?yàn)閏hr(13)等,自動(dòng)替換輸出。
2、測(cè)試代碼:
%
s="1,2,3,4,2,3,5,3"
s=cxarraynull(s,",")
response.write s
%>
輸出:1,2,3,4,5


腳本之家增強(qiáng)版本,解決了數(shù)組中最后一位的,逗號(hào)問(wèn)題。
復(fù)制代碼 代碼如下:

%
function cxarraynull(cxstr1,cxstr2)
if isarray(cxstr1) then
cxarraynull = "對(duì)不起,參數(shù)1不能為數(shù)組"
Exit Function
end if
if cxstr1 = "" or isempty(cxstr1) then
cxarraynull = "nodate"
Exit Function
end if
do while instr(cxstr1,",,")>0
cxstr1=replace(cxstr1,",,",",")
loop
if right(cxstr1,1)="," then
cxstr1=left(cxstr1,len(cxstr1)-1)
end if
ss = split(cxstr1,cxstr2)
cxs = cxstr2ss(0)cxstr2
sss = cxs
for m = 0 to ubound(ss)
cc = cxstr2ss(m)cxstr2
if instr(sss,cc)=0 then
sss = sssss(m)cxstr2
end if
next
cxarraynull = right(sss,len(sss) - len(cxstr2))
cxarraynull = left(cxarraynull,len(cxarraynull) - len(cxstr2))
end function
%>

測(cè)試代碼:
復(fù)制代碼 代碼如下:

s="1,2,3,4,55,55,55,333,333,2,3,5,3,88,,,,,,,66,,66,,,,,,,,,,,,,,,,,,,,,,,,"
s=cxarraynull(s,",")
response.write s

您可能感興趣的文章:
  • asp取得數(shù)組中的最大值的方法
  • asp下使用數(shù)組存放數(shù)據(jù)的代碼
  • asp 得到動(dòng)態(tài)數(shù)組中元素的個(gè)數(shù)
  • asp.net 數(shù)組中字符串替換的幾種方式
  • asp 動(dòng)態(tài)數(shù)組 提供Add、Insert、Remove、RemoveAt、Search等方法。
  • asp.net 字符串、二進(jìn)制、編碼數(shù)組轉(zhuǎn)換函數(shù)
  • asp.net通過(guò)js實(shí)現(xiàn)Cookie創(chuàng)建以及清除Cookie數(shù)組的代碼
  • asp textarea 多行數(shù)組分割處理方法
  • ASP 過(guò)濾數(shù)組重復(fù)數(shù)據(jù)函數(shù)(加強(qiáng)版)
  • ASP 使用Filter函數(shù)來(lái)檢索數(shù)組的實(shí)現(xiàn)代碼
  • asp數(shù)組的使用介紹
  • Asp與JS的數(shù)組和字符串下標(biāo)介紹
  • asp中使用redim、preserve創(chuàng)建動(dòng)態(tài)數(shù)組實(shí)例
  • ASP定義數(shù)組方法的技巧

標(biāo)簽:通化 通遼 運(yùn)城 鷹潭 巴彥淖爾 普洱 荊門(mén) 雅安

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《asp 數(shù)組 重復(fù)刪除函數(shù)(腳本之家增強(qiáng)版)》,本文關(guān)鍵詞  asp,數(shù)組,重復(fù),刪除,函數(shù),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《asp 數(shù)組 重復(fù)刪除函數(shù)(腳本之家增強(qiáng)版)》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于asp 數(shù)組 重復(fù)刪除函數(shù)(腳本之家增強(qiáng)版)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 平舆县| 株洲市| 黄陵县| 佛坪县| 鞍山市| 扎鲁特旗| 宣化县| 治县。| 香河县| 淮滨县| 东阿县| 东至县| 水城县| 西华县| 缙云县| 阳西县| 固始县| 久治县| 福鼎市| 梁平县| 泰顺县| 湘西| 泰来县| 胶南市| 灵丘县| 克什克腾旗| 信宜市| 桑日县| 葵青区| 绥棱县| 南皮县| 洞口县| 郴州市| 瑞金市| 门头沟区| 莎车县| 内黄县| 阜平县| 广州市| 鹤峰县| 昭苏县|