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

源码网商城

GetBody asp实现截取字符串的代码

  • 时间:2021-08-28 02:46 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:GetBody asp实现截取字符串的代码
'================================================== '函数名:GetBody '作  用:截取字符串 '参  数:ConStr ------将要截取的字符串 '参  数:StartStr ------开始字符串 '参  数:OverStr ------结束字符串 '参  数:IncluL ------是否包含StartStr '参  数:IncluR ------是否包含OverStr '================================================== Function GetBody(ConStr,StartStr,OverStr,IncluL,IncluR)    If ConStr="$False$" or ConStr="" or IsNull(ConStr)=True Or StartStr="" or IsNull(StartStr)=True Or OverStr="" or IsNull(OverStr)=True Then       GetBody="$False$"       Exit Function    End If    Dim ConStrTemp    Dim Start,Over    ConStrTemp=Lcase(ConStr)    StartStr=Lcase(StartStr)    OverStr=Lcase(OverStr)    Start = InStrB(1, ConStrTemp, StartStr, vbBinaryCompare)    If Start<=0 then       GetBody="$False$"       Exit Function    Else       If IncluL=False Then          Start=Start+LenB(StartStr)       End If    End If    Over=InStrB(Start,ConStrTemp,OverStr,vbBinaryCompare)    If Over<=0 Or Over<=Start then       GetBody="$False$"       Exit Function    Else       If IncluR=True Then          Over=Over+LenB(OverStr)       End If    End If    GetBody=MidB(ConStr,Start,Over-Start) End Function
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部