欢迎光临
我们一直在努力

len(),lift(),right()不能正常识别中文的用户请进!

建站超值云服务器,限时71元/月

以下用法和len(),lift(),right()一样。

function strlength(str)
    temp_str=len(str)
    for i=1 to temp_str
        test_str=(mid(str,i,1))
        if asc(test_str)>0 then
            strlength=strlength+1
        else
            strlength=strlength+2
        end if
    next
end function
function strleft(str,l)
    temp_str=len(str)
    for i=1 to temp_str
        test_str=(mid(str,i,1))
        strleft=strleft&test_str
        if asc(test_str)>0 then
            lens=lens+1
        else
            lens=lens+2
        end if
            if lens>=l then exit for
    next
end function
function strright(str,l)
    temp_str=len(str)
    for  i = temp_str to 1 step -1
        test_str=(mid(str,i,1))
        strright=test_str&strright
        if asc(test_str)>0 then
            lens=lens+1
        else
            lens=lens+2
        end if
            if lens>=l then exit for
    next
end function

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » len(),lift(),right()不能正常识别中文的用户请进!
分享到: 更多 (0)