我想问下ASP计算字符串长度怎么写
ASP计算字符串长度(字节)的函数
Function lenStr(str) dim l,t,c dim i l=len(str) t=0 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 if c>255 then t=t+2 next lenstr=t End Function
用法实例:<%=lenstr(您的字符串变量)%>