» 网友学堂 » ASP教程 » 分行模块,自动识别英文和型号数 -> 查看 2007年02月16日 更新
分行模块,自动识别英文和型号数
作者:问天 发表时间:2007-2-16 14:41 阅读:138次 在百度搜索相关内容

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)
[color=#FFFFFF'][/color]

GetTexts = GetTexts Left(tmptext, 1)
tmptext = Right(tmptext, Len(tmptext) - 1)
'If Len(tmptext) <= lens Then Exit Do
Loop
GetTexts = GetTexts &;amp; "<br>"
Loop
cuttextlen = GetTexts &;amp; tmptext
End If
End Function
具体例子位置还是WWW.HIFI-CHINA.COM

#Advertisement