中西文混合式字符截取程序
function CutStr(byVal val
Dim l
If val = "" Or IsNull(val) Then
CutStr = ""
Exit Function
End If
If length = "" Or Int(length) <=
CutStr = val
Exit Function
End If
val = LoseHTML(val)
l = Len(val)
length = Int(length)
t =
For i =
c = Ascw(Mid(val
If c <
IF t >= length Then
CutStr = Left(val
Exit For
Else
CutStr = val
End If
Next
End Function
From:http://tw.wingwit.com/Article/program/net/201311/14458.html