最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp取得字符长度函数
时间:2022-07-02 22:43:12 编辑:袖梨 来源:一聚教程网
function gotTopic(str,strlen)
if str="" then
gotTopic=""
exit function
end if
dim l,t,c, i
str=replace(replace(replace(replace(str," "," "),""",chr(34)),">",">"),"<","<")
l=len(str)
t=0
for i=1 to l
c=Abs(Asc(Mid(str,i,1)))
if c>255 then
t=t+2
else
t=t+1
end if
if t>=strlen then
gotTopic=left(str,i) & "…"
exit for
else
gotTopic=str
end if
next
gotTopic=replace(replace(replace(replace(gotTopic," "," "),chr(34),"""),">",">"),"<","<")
end function
相关文章
- 为什么稳定币需要隐私?市值越大恶梦越多 06-16
- 《咏月风雅》翩然技能属性具体介绍 06-16
- 《零之战线》尼古拉一世约会位置怎么找 06-16
- 《这城有良田》仓廪有实有哪些玩法 06-16
- 《元梦之星》枪械瞄准哪些方法效果更好 06-16
- 《桃花师》改名可行的方法有哪些 06-16