截取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
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
相关文章推荐
- CentOS 源码安装 MySql
- caffe 卷积神经网络源码一些模糊点整理
- redis在linux环境下的安装与启动
- Window对象与DOM
- Ajax相关总结
- 操作JSON
- HTML5基础
- HttpServletrequest 与HttpServletResponse总结
- linux下svn服务器搭建步骤
- Linux云服务器安装tomcat
- 根据两点经纬度计算距离
- Jsp四个作用域page、request、session和application的区别
- 如何注册、使用微信企业号及安装第三方应用详解
- 微信企业号开发-如何建立连接
- Java中的抽象类
- .NET程序性能的基本要领
- Java中数据类型及其之间的转换
- 简单微信界面
- Maven学习之19设置自动下载sources和Javadocs
- iOS 16进制颜色转化为rgb 颜色