原創(chuàng)" />

最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

原創(chuàng)  更新時(shí)間:2006年08月30日 00:00:00   原創(chuà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="&nbsp;"
strbuall=strbuall&strbu
next
thev=thestr&strbuall
strbu=""
strbuall=""
end if
next
cutstr=thev
end function

相關(guān)文章

最新評論

宁南县| 北海市| 马公市| 大新县| 娄烦县| 茶陵县| 龙口市| 平泉县| 武平县| 巴彦淖尔市| 青岛市| 丽水市| 沐川县| 平陆县| 成都市| 西青区| 遂溪县| 噶尔县| 北安市| 宁陵县| 三门县| 温州市| 碌曲县| 宜川县| 无棣县| 梁平县| 武功县| 福泉市| 资中县| 新巴尔虎右旗| 广西| 含山县| 桐柏县| 庐江县| 平阳县| 马公市| 自治县| 泸水县| 龙泉市| 博乐市| 竹山县|