• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    ASP字符串转换为整形、双精度型、布尔
    Rem 将字符串转换为整形数据
    function toInteger(str,num)
            str=trim(str)
            if str="" or not isnumeric(str) then
                  toInteger=num
            else
                  toInteger=clng(str)
            end if
    end function

    Rem 将字符串转换为双精度型数据
    function toDouble(str)
           str=trim(str)
           if str="" or not isnumeric(str) then
                  toDouble=0.0
          else
                  toDouble=cdbl(str)
          end if
    end function

    Rem 将字符串转换为布尔数据
    function toBoolean(str)
          str=lcase(trim(str))
          if str="true" or str="t" then
                toBoolean=true
         elseif isnumeric(str) then
                if clng(str)>0 then toBoolean=true
         else
               toBoolean=false
        end if
    end function
    上一篇:利用MSXML2.XmlHttp和Adodb.Stream采集图片
    下一篇:ASP计算str2在str1中出现的次数
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    ASP字符串转换为整形、双精度型、布尔 ASP,字符串,转换,为,整形,