当前位置:编程学习 > asp >>

分行模块,自动识别英文和型号数推荐精华

答案: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

上一个:又一种在线人数统计方法(只用1个APPLICATION,原创)
下一个:处理图片、文章的程序

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,