当前位置: 首页 > 图文教程 > 网络编程 > ASP > 分行模块,自动识别英文和型号数

ASP
ASP+ACCESS实现的无限级目录树
ASP中字符串函数的应用
在VBScript中使用类(一)
在VBScript中使用类(二)
VS .net 2003调试javascript中两个杂症的解决
在VBScript中使用类(三)
如何在 dataGrid 上的第一列加上 CheckBox
在VBScript中使用类(四)
ASP.NET 的状态管理
用Asp写个加密和解密的类
网页制作 JSP与ASP 的比较
ASP.NET设计网络硬盘之两重要类
ASP:网上通讯簿1.00
ASP:Hack & Anti-Hack
ASP基本语法
ASP实用函数库
ASP进阶教程:给留言簿润下色
ASP进阶教程:数据库版本的留言簿
ASP进阶教程:留言簿自动发E-Mail
ASP进阶教程:留言查询功能(一)

ASP 中的 分行模块,自动识别英文和型号数


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 130 ::
收藏到网摘: n/a

  Function cuttextlen(intext, lens)
    If Len(intext) <= lens Then
        cuttextlen = intext
    Else
        tmptext = intext
        GetTexts = ""
        Do While Not Len(tmptext) <= lens
        
            GetTexts = GetTexts + Left(tmptext, lens)
            tmptext = Right(tmptext, Len(tmptext) - lens)
            Do While (Asc(Left(tmptext, 1)) >= 65 And Asc(Left(tmptext, 1)) <= 90) Or (Asc(Left(tmptext, 1)) >= 97 And Asc(Left(tmptext, 1)) <= 122) Or (Asc(Left(tmptext, 1)) >= 45 And Asc(Left(tmptext, 1)) <= 57)
                GetTexts = GetTexts + Left(tmptext, 1)
                tmptext = Right(tmptext, Len(tmptext) - 1)
                'If Len(tmptext) <= lens Then Exit Do
            Loop
        GetTexts = GetTexts & "<br>"
        Loop
        cuttextlen = GetTexts & tmptext
    End If
End Function
具体例子位置还是WWW.HIFI-CHINA.COM