国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > ASP > 正文

asp截取字符串的兩種應(yīng)用 原創(chuàng)

2024-05-04 11:02:59
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
1、純粹的截取字符串
復(fù)制代碼 代碼如下:
function cutstr(thestr1,strlen)
dim l,t,c
l=len(thestr1)
if l<1 then exit function
t=0
for dxy1=1 to l
c=Abs(asc(Mid(thestr1,dxy1,1)))
if c>255 then
t=t+2
else
t=t+1
end if
if t>=strlen then
thev=mid(thestr1,1,dxy1)
exit for
else
thev=thestr1
end if
next
cutstr=thev
end function

2、截取字符串,不足用空格補(bǔ)上
復(fù)制代碼 代碼如下:
function cutstr(thestr,strlen)
dim l,t,c
l=len(thestr)
t=0
for dxy=1 to l
c=Abs(asc(Mid(thestr,dxy,1)))
if c>255 then
t=t+2
else
t=t+1
end if
if t>=strlen then
thev=left(thestr,dxy)
exit for
else
bu=strlen-t
for bui=1 to bu
strbu=" "
strbuall=strbuall&strbu
next
thev=thestr&strbuall
strbu=""
strbuall=""
end if
next
cutstr=thev
end function

您可能感興趣的文章:

asp下實(shí)現(xiàn)截取字符串特定部分內(nèi)容函數(shù)asp 字符串截取函數(shù)GetBody asp實(shí)現(xiàn)截取字符串的代碼用asp實(shí)現(xiàn)的截取指定格式字符串的代碼asp從字符串里截取N個(gè)帶HTML的字符的函數(shù)asp截取指定英漢混合字符串_支持中文ASP.NET 字符串截取asp CutStrX字符串截取函數(shù)(過(guò)濾全部HTML標(biāo)記)asp實(shí)現(xiàn)截取字符串函數(shù)
發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 泸西县| 和平区| 图木舒克市| 北流市| 湖北省| 阿拉尔市| 文化| 寿阳县| 东乌珠穆沁旗| 平和县| 乐东| 冀州市| 五原县| 临海市| 罗定市| 新兴县| 永康市| 静宁县| 宜城市| 五家渠市| 大悟县| 故城县| 涟源市| 台湾省| 确山县| 玛曲县| 铁岭市| 巫山县| 桦南县| 惠东县| 从江县| 临沧市| 饶平县| 沂水县| 新巴尔虎右旗| 湖南省| 松潘县| 西乌珠穆沁旗| 仪陇县| 台湾省| 渝北区|