页面导航: 首页网络编程ASP编程应用技巧 → 正文内容 asp计算字符串出现次数

ASP计算str2在str1中出现的次数

发布:dxy 字体:[增加 减小] 类型:转载
可以方便计算一个字符串在另一个字符串出现的次数
function CountStr(str1,str2)
dim tmp,i,j
if str1="" or isnull(str1) then
j=0
elseif str2="" or isnull(str2) then
j=1
else
tmp=split(str1,str2)
j=0
for i=0 to ubound(tmp)
if tmp(i)<>"" then j=j+1
next
end if
countstr=j
end function
浏览次数:载入中... 打印本文关闭本文返回首页
·在百度中搜索关于“ASP计算str2在str1中出现的次数”相关内容
·在谷歌中搜索关于“ASP计算str2在str1中出现的次数”相关内容

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行