欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ASP字符串轉(zhuǎn)換為整形、雙精度型、布爾

 更新時(shí)間:2008年05月15日 23:28:40   作者:  
asp可以輕松將字符串類型轉(zhuǎn)化為其它類型的函數(shù)
Rem 將字符串轉(zhuǎn)換為整形數(shù)據(jù)
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 將字符串轉(zhuǎn)換為雙精度型數(shù)據(jù)
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 將字符串轉(zhuǎn)換為布爾數(shù)據(jù)
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

相關(guān)文章

最新評(píng)論