sp判断中西混字符串长度
sp判断中西混字符串长度
'==============================
'函 数 名:StringLength
'作 用:判断字符串长度
'参 数:需进行判断的文本Txt
'==============================
Private Function StringLength(Txt)
Txt=Trim(Txt)
x=Len(Txt)
y=0
For ii = 1 To x
If Asc(Mid(Txt,ii,1))<=2 or Asc(Mid(Txt,ii,1))>255 Then
y=y + 2
Else
y=y + 1
End If
Next
StringLength=y
End Function
- 上一篇:asp 过滤简单html代码程序
- 下一篇:asp 常用的字符串处理函数