byte check

Windows/ASP 2009. 9. 17. 14:18
'------------------------------------------------------------------------------
'   Description : byte(바이트) 글자 체크
'------------------------------------------------------------------------------
function fn_ByteLen(str)
    tlen=0
    tt=len(str)
    k=1
    for i=1 to tt
        if asc(mid(str,k,1)) < 0 then
            tlen=tlen+2
        else
            tlen=tlen+1
        end if
        k=k+1
    next
    fn_ByteLen=tlen
end function
Posted by 아로스

아로스

달력

05-18 17:56