源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2022-09-02 10:51 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:ASP计算str2在str1中出现的次数
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
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部