设为首页
加入收藏
站内地图
旧版入口
当前位置:首页 > 站长学院 > 网络编程 > ASP

判断文章中文字符数量

作者:佚名 出处:网络转载 时间:11-28 点击:

内容载入中...
   dim WINNT_CHINESE
WINNT_CHINESE = (len("论坛")=2)</P><P>function strLength(str)
ON ERROR RESUME NEXT
if WINNT_CHINESE then
dim l,t,c
dim i
l=len(str)
t=l
for i=1 to l
c=asc(mid(str,i,1))
if c<0 then c=c+65536
if c>255 then
t=t+1
end if
next
strLength=t
else
strLength=len(str)
end if
if err.number<>0 then err.clear
end function

收藏本文:
】【打印页面】【推荐给朋友】【关闭窗口

站长学院

推荐信息