Function myLen(str)
Dim i,c,h
For i = 1 To Len(str)
c = Asc(Mid(Str, i, 1))
If c >= 0 And c < 128 Then
n = n + 1 '计算英文
Else
n = n + 2 '计算中文
End If
Next
myLen = n
End Function
[此贴子已经被作者于2005-7-30 23:15:09编辑过]
VB, Delphi, ASP, PHP, JSP, .NET
MS SQL, My SQL, Oracle
Diablo, StarCraft, WarCraft, World of Warcraft