'-----------------------------------------------
'[DATE] 00-09-28
'[AUTHOR] Calfly
'[PURPOSE] 功能相当于len(),不过中文算两个字符(用于中文平台)
'[INPUT] 字符串
'[OUTPUT] 字符串的标准长度
'------------------------------------------------
Function LenatC(strArg)
dim inttemp,i
If strArg="" or isNull(strArg) Then
LenatC=0
Else
strArg=cstr(strArg)
inttemp=0
For i=1 to Len(strArg)
'当asc码小于零,就是中文字符。我以为
If asc(mid(strArg,i,1))>0 Then
inttemp=inttemp+1
Else
inttemp=inttemp+2
End If
Next
LenatC=inttemp
End If
End Function