中国石凳联盟 登录注册

去除字符串中间存在的空格

rj45··0 回复·242 浏览

发表回复
Public Function ReplaceSpace(ByVal str As String) As String
Dim i As Integer
i = InStr(str, " ")
Do While i
0
i = InStr(str, " ")
If i
0 Then
str = Replace(str, " ", "")
End If
Loop
ReplaceSpace = str
End Function

Being a devil is the same as being a human. We should be kind. If we are kind, we are not a devil, we are a hybrid.
点赞0 收藏
发表回复
发表回复