此版本为重载版Trim方法
Function TrimX(source As String, tim As String) As String
' trim start
Dim tLong As Integer
tLong = Len(tim)
If tLong = 0 Then
TrimX = source
Return
End If
Do While Left(source, tLong) = tim
source = Mid(source, 2)
Loop
Do While Right(source, tLong) = tim
source = Left(source, Len(source) - tLong)
Loop
TrimX = source
End Function