濮阳杆衣贸易有限公司

主頁 > 知識庫 > 截取實際長度字符串,并用空格替換

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

熱門標(biāo)簽:電話機(jī)器人案例 成都銷售外呼系統(tǒng)公司 土地證宗地圖標(biāo)注符號 自動外呼系統(tǒng)怎么防止封卡 保定電銷機(jī)器人軟件 vue 地圖標(biāo)注拖拽 客服外呼系統(tǒng)呼叫中心 鎮(zhèn)江云外呼系統(tǒng)怎么樣 電話機(jī)器人銷售公司嗎

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=strbuallstrbu
next
thev=thestrstrbuall
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 cnum0 then w_cut=w_cut"...":exit for
    tt=mid(ctypes,ci,1)
    if int(asc(tt))>=0 then
      w_cut=w_cuttt
      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_cuttt
    end if
  next
End Function

%>

標(biāo)簽:天津 懷化 麗江 內(nèi)江 重慶 臺灣 成都 公主嶺

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《截取實際長度字符串,并用空格替換》,本文關(guān)鍵詞  截取,實際,長度,字符串,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《截取實際長度字符串,并用空格替換》相關(guān)的同類信息!
  • 本頁收集關(guān)于截取實際長度字符串,并用空格替換的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    轮台县| 科尔| 镇坪县| 潍坊市| 田林县| 铁岭县| 忻州市| 嘉黎县| 剑川县| 纳雍县| 济阳县| 榆中县| 偃师市| 北京市| 邹城市| 中西区| 武冈市| 桐乡市| 庆阳市| 南澳县| 昌都县| 鸡东县| 通州市| 南昌市| 嘉义县| 临澧县| 泗阳县| 铜陵市| 禹城市| 江安县| 濮阳县| 临澧县| 新巴尔虎右旗| 甘德县| 马尔康县| 大竹县| 竹北市| 共和县| 淳化县| 宣城市| 卢龙县|