您的位置:首页 > 其它

截取32 个字节

2016-05-13 15:37 197 查看
'作废
Public Function GetDealWithStr(strInit As String) As String
'**************************************************************************
'功 能:对字符串进行处理 长度>17 的在17位置加上换行符 反之 不进行处理
'传入参数:要处理的字符串
'返回参数:处理后的字符串
'作 者: qieqian
'日 期:2016-5-12
'**************************************************************************
On Error GoTo err
Dim i As Long
Dim length As Long
Dim StrOperation As String

length = 0
StrOperation = ""

For i = 1 To Len(strInit)

If (Asc(Mid(strInit, i, 1)) < 0) Then
length = length + 2
Else
length = length + 1
End If

If length > 34 Then
length = 0
StrOperation = StrOperation & Space(1) & vbCrLf & Mid(strInit, i, 1)
Else
StrOperation = StrOperation & Mid(strInit, i, 1)
End If

Next i

GetDealWithStr = StrOperation
Exit Function
err:
MsgBox err.Number & err.Description
End Function
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: