转换文本按一定字数折叠

2015-09-15 0 626
转换文本按一定字数折叠
Private Function wrapword(str As String, CharsInOneLine As Integer, fixedLines As Integer) As String
Dim c As Integer, i As Integer
c = (Len(str) - (Len(str) Mod CharsInOneLine)) / CharsInOneLine
For i = 0 To c
    wordwrap = wordwrap & IIf(i = c, Mid(str, i * CharsInOneLine + 1), Mid(str, i * CharsInOneLine + 1, CharsInOneLine)) & vbcrlf
Next i
If fixedLines > c Then
    For i = 0 To fixedLines - c - 3
        wordwrap = wordwrap & vbcrlf
    Next i
End If
End Function

遇见资源网 ASP/Basic 转换文本按一定字数折叠 http://www.ox520.com/13511.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务