中西文混合式字符截取程序
function CutStr(byVal valbyVal lengthbyVal endStr)
Dim ltci
If val = "" Or IsNull(val) Then
CutStr = ""
Exit Function
End If
If length = "" Or Int(length) <= Or IsNumeric(length) = False Then
CutStr = val
Exit Function
End If
val = LoseHTML(val)
l = Len(val)
length = Int(length)
t =
For i = To l
c = Ascw(Mid(vali))
If c < Or c > Then t = t + Else t = t +
IF t >= length Then
CutStr = Left(vali) & endStr
Exit For
Else
CutStr = val
End If
Next
End Function