28,409
社区成员




if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then
改为if ascw(mid(txt,ii,1)) < 0 or ascw(mid(txt,ii,1)) >255 then
Function InterceptString(txt,length)
dim x,y,ii
txt=trim(txt)
x = len(txt)
y = 0
if x >= 1 then
for ii = 1 to x
if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then
y = y + 2
else
y = y + 1
end if
if y >= length then
txt = left(txt,ii) '字符串限长
exit for
end if
next
if len(txt) < x then
InterceptString = txt & ".."
else
InterceptString = txt
end if
else
InterceptString = ""
end if
End Function