最新下载
热门教程
- 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
相关文章
- SUI价格逼近5美元大关:多头能否继续主导市场? 08-02
- 《龙息神寂》龙与地下城联动英雄奥玛抽取建议 08-02
- 卡尔达诺(ADA)8月2日价格预测 08-02
- 《龙息神寂》瓦斯卡平民冰队打法攻略 08-02
- 《满庭芳宋上繁华》玩家自制地图添加方法 08-02
- Tether计划推出华尔街专属稳定币 强化美国市场布局 08-02