If the title is too long, because the page layout limit, can only list 10 characters, this function will help you achieve
Copy Code code as follows:
' Intercept string strvalue (title, Word count)
function strvalue (str,lennum)
Dim p_num
Dim i
If strlen (str) <=lennum Then
Strvalue=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
Strvalue=left (Trim (str), x) & "..."
Loop
End If
End Function
function strlen (str)
Dim Page_len
Page_len=0
Strlen=0
If Trim (str) <> "" Then
Page_len=len (Trim (str))
For Xx=1 to Page_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
How to use:
Copy Code code as follows:
<%=strvalue ("Accurate programming language, correct code syntax coloring, input simple word code fragment description", ten)%>
The above mentioned is the entire content of this article, I hope you can enjoy.