作家
登录

asp截取字符串的两种应用 原创

作者: 来源:www.28hudong.com 2013-03-30 09:01:24 阅读 我要评论

1、纯粹的截取字符串复制代码 代码如下: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 function2、截取字符串,不足用空格补上复制代码 代码如下: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

  推荐阅读

  Object对象的一些的隐藏函数介绍

原作者:fictiony 出自:蓝色理想 自己写一套类模型的时候顺便整理出来的,贴出来给大家看看,希望能对大家有所帮助。 属性:Object.constructor 该属性被定义在类的prototype中,当对象实例创建后通过__proto__链>>>详细阅读


本文标题:asp截取字符串的两种应用 原创

地址:http://www.17bianji.com/kaifa2/ASP/33143.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)