Asp利用字符串处理多个空格只保留一个
作者:admin 日期:2012-04-26
Do while实现:
ASP/Visual Basic代码
- <%
- text="你 好 世 界!"
- x=0
- do while x=1
- text=replace(text," "," ")
- if instr(text," ")<0 then
- x=1
- end if
- loop
- response.Write(text)
While wend实现:
ASP/Visual Basic代码
- text="你 好 世 界!"
- x=0
- while not x=0
- text=replace(text," "," ")
- if instr(text," ")<0 then
- x=1
- end if
- wend
- response.Write(text)
原创代码,转载请注明出处,谢谢!
更多Asp循环语句可参考:https://blog.guanjianci.net/article.asp?id=548
[本日志由 admin 于 2012-04-26 11:21 AM 更新]
上一篇: Asp从长关键字中提取关键字根下一篇: ASP中循环语句使用实例
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: asp
相关日志:
评论: 0 | 引用: 0 | 查看次数: 2017
发表评论
广告位