function Strlength (str)
On ERROR RESUME NEXT
Dim Winnt_chinese
Winnt_chinese = (len ("forum") =2)
If Winnt_chinese Then
Dim l,t,c
Dim i
L=len (str)
T=l
For I=1 to L
C=ASC (Mid (str,i,1))
If C<0 then c=c+65536
If c>255 Then
T=t+1
End If
Next
Strlength=t
Else
Strlength=len (str)
End If
If Err.number<>0 then Err.Clear
End Function
function strlen (str)
Dim p_len,xx
P_len=0
Strlen=0
If Trim (str) <> "" Then
P_len=len (Trim (str))
For Xx=1 to P_len
If ASC (Mid (str,xx,1)) <0 Then
Strlen=int (strlen) + 2
Else
Strlen=int (strlen) + 1
End If
Next
End If
End Function
function Cutstr (str,lennum)
Dim p_num
Dim i,x
If strlen (str) <=lennum Then
Cutstr=str
Else
P_num=0
X=0
Do, not p_num > Lennum-2
X=x+1
If ASC (Mid (str,x,1)) <0 Then
P_num=int (P_num) + 2
Else
P_num=int (p_num) + 1
End If
Cutstr=left (Trim (str), x) & "..."
Loop
End If
End Function
function Insertzero (M)
If Len (M) =1 Then
insertzero= "0" &m
Else
Insertzero=m
End If
End Function