#42002/1/8 12:45:15
呵呵,我只是给了点提示而已。如果你真的要区别中文,把一个中文当成
两个byte看,就写一个function,这个function将字符一个一个的检查,如果
是中文就算2,不就好了吗?
-----------------------------------------------------------
function getLen (str)
length = len (str)
index = 1
result = 0
while (index < length)
if asc(substr(str, index, 1)) > 160 then
result = result + 2
else
result = result + 1
end if
index = index+1
wend
getLen=result
end function
function substr (str, startpos, length)
endpos = startpos + length
str = left (str, endpos)
str = right (str, 1)
substr = str
end function
--------------------------------------------------
我没有测试,但是应该没有问题的。
编辑历史:[这消息被wowomo编辑过(编辑时间2002-01-08 12:45:54)]