推荐下天枫常用ASP函数封装,推荐大家使用

2019-04-02 04:46:55于丽

                t=t+1
              End If
              If t>=strlen Then
                cutstr=Left(str,i) & "..."
                Exit For
              Else
                cutstr=str
              End If
           Next
           cutstr=Replace(Replace(Replace(Replace(replace(cutstr," "," "),Chr(34),"""),">",">"),"<","<"),"|","|")
        End Function

'--------------系列验证----------------------------

    '****************************************************
    '函数名:CheckIsEmpty
    '作  用:检查是否为空
    '参  数:tstr ----字符串
    '返回值:true不为空,false为空
    '****************************************************
    Public Function CheckIsEmpty(tstr)
        CheckIsEmpty=false
        If IsNull(tstr) or Tstr="" Then Exit Function 
        Dim Str,re
        Str=Tstr
        Set re=new RegExp
        re.IgnoreCase =True
        re.Global=True
        str= Replace(str, vbNewLine, "")
        str = Replace(str, Chr(9), "")
        str = Replace(str, " ", "")
        str = Replace(str, " ", "")
        re.Pattern="<img(.[^>]*)>"
        str =re.Replace(Str,"94kk")
        re.Pattern="<(.[^>]*)>"