明輝手游網(wǎng)中心:是一個(gè)免費(fèi)提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺(tái)!

分行模塊,自動(dòng)識(shí)別英文與型號(hào)數(shù)

[摘要]Function cuttextlen(intext, lens) If Len(intext) <= lens Then cuttextlen = intext Else tmptext = intext GetTexts = &quo...
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