`
JAVA天地
  • 浏览: 657095 次
  • 性别: Icon_minigender_1
  • 来自: 太原
文章分类
社区版块
存档分类
最新评论

写的一个字符串折分函数,并将结果存于数组中

 
阅读更多

<%
dim id_array(20)
dim total_id
total_id=0
Sub InterceptString(txt,str)
txt=trim(txt)
x = len(txt)
y = 0
tempStr=""

if x >= 1 then
for ii = 1 to x
if mid(txt,ii,1)=str then
id_array(y)=tempStr
y=y+1
tempStr=""
else
tempStr=tempStr+mid(txt,ii,1)
end if
next
end if
id_array(y)=tempStr
total_id=y
End Sub
%>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics