最新下载
热门教程
- 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
相关文章
- MCP 原理解析与开发实战 09-13
- 第 8 章:Tool Calling 调用链与 Tool Search 机制 09-13
- AI软件原型走向正式商用,还需补齐哪些工程环节? 09-13
- Ubuntu系统怎么打开蓝牙? Ubuntu蓝牙的打开方法 09-13
- Ubuntu18.04怎么连接到隐藏的WiFi网络? 09-13
- ubuntu16.04怎么手动升级到ubuntu18.04? 09-13