Public Function zqTrim(ByVal strSour As String) As String
Dim strTmp As String
Dim nLen As Integer
Dim i As Integer, j As Integer
Dim strNow As String, strValid() As String, strNew As String
注释:strNow 当前字符
注释:strValid 有效字符
注释:strNew 最后生成的新字符
strTmp = Trim$(strSour)
nLen = Len(strTmp)
If nLen < 1 Then
zqTrim = ""
Exit Function
End If
j = 0
For i = 1 To nLen
strNow = Mid(strTmp, i, 1) 注释:每次读取一个字符
注释:MsgBox Asc(strNow)
If strNow <> vbNullChar And Asc(strNow) <> 9 Then 注释:如果有效,则存入有效数组
ReDim Preserve strValid(j)
strValid(j) = strNow
j = j 1
End If
Next i
strNew = Join(strValid, "")
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



