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

首頁 > 編程 > ASP > 正文

ASP去掉字符串頭尾連續回車和空格的Function

2024-05-04 11:09:03
字體:
來源:轉載
供稿:網友
去掉字符串頭尾的連續的回車和空格 去掉字符串開頭的連續的回車和空格 去掉字符串末尾的連續的回車和空格
 
 
 
'去掉字符串頭尾的連續的回車和空格 
function trimVBcrlf(str) 
trimVBcrlf=rtrimVBcrlf(ltrimVBcrlf(str)) 
end function 

'去掉字符串開頭的連續的回車和空格 
function ltrimVBcrlf(str) 
dim pos,isBlankChar 
pos=1 
isBlankChar=true 
while isBlankChar 
if mid(str,pos,1)=" " then 
pos=pos+1 
elseif mid(str,pos,2)=VBcrlf then 
pos=pos+2 
else 
isBlankChar=false 
end if 
wend 
ltrimVBcrlf=right(str,len(str)-pos+1) 
end function 

'去掉字符串末尾的連續的回車和空格 
function rtrimVBcrlf(str) 
dim pos,isBlankChar 
pos=len(str) 
isBlankChar=true 
while isBlankChar and pos>=2 
if mid(str,pos,1)=" " then 
pos=pos-1 
elseif mid(str,pos-1,2)=VBcrlf then 
pos=pos-2 
else 
isBlankChar=false 
end if 
wend 
rtrimVBcrlf=rtrim(left(str,pos)) 
end function
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 翁牛特旗| 辽阳市| 云林县| 商水县| 黄平县| 义乌市| 喜德县| 安徽省| 镶黄旗| 贵定县| 三都| 伽师县| 玛沁县| 隆化县| 邓州市| 四平市| 大石桥市| 余姚市| 嘉黎县| 北川| 腾冲县| 浦城县| 高邑县| 白朗县| 乡宁县| 双牌县| 石嘴山市| 汉寿县| 射洪县| 巧家县| 明溪县| 稷山县| 南昌市| 百色市| 四会市| 泉州市| 洪湖市| 云林县| 张北县| 兴化市| 兴山县|