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

截取實際長度字符串,并用空格替換

 更新時間:2006年06月20日 00:00:00   作者:  

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

<%
'============================
'函數(shù)名w_cut(type,num)
'作用:字符串截取
'參數(shù)type,num
'type:字符串內(nèi)容
'num:字符串被截取的長度
'=============================

Function w_cut(types,num)
  dim ctypes,cnum,ci,tt,tc,cc
  ctypes=types:cnum=int(num):w_cut="":tc=0:cc=0
  for ci=1 to len(ctypes)
    if cnum<0 then w_cut=w_cut&"...":exit for
    tt=mid(ctypes,ci,1)
    if int(asc(tt))>=0 then
      w_cut=w_cut&tt
      tc=tc+1:cc=cc+1
      if tc=2 then
        tc=0:cnum=cnum-1
      end if
      if cc>5 then cnum=cnum-1:cc=0
    else
      cnum=cnum-1
      if cnum<=0 then w_cut=w_cut&"...":exit for
      w_cut=w_cut&tt
    end if
  next
End Function

%>

相關(guān)文章

最新評論

陵水| 徐汇区| 历史| 呼图壁县| 东台市| 乐安县| 油尖旺区| 辽宁省| 万州区| 化德县| 连州市| 综艺| 光泽县| 双牌县| 齐齐哈尔市| 治县。| 丹寨县| 台东市| 平顺县| 泗水县| 昭平县| 宜良县| 疏勒县| 云和县| 安福县| 永春县| 上杭县| 厦门市| 玉环县| 将乐县| 东乌珠穆沁旗| 太和县| 尼木县| 齐齐哈尔市| 长顺县| 西充县| 鄄城县| 嵩明县| 永州市| 新干县| 和林格尔县|