我该怎么去掉字符串里的space
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Sub Form_Load()
Dim Sysdir As String, x As Long, x4 As Long
Sysdir = Space(20)
x = GetSystemDirectory(Sysdir, 20)
x4 = Len(Sysdir)
Label2.Caption = x4
Label1.Caption = "keu" & Trim(Sysdir) & "\abc"
End Sub
结果显示:keuC:\WINDOWS\SYSTEM
而\abc却没有显示?
使用TRIM(SYSDIR)函数也没用
我该怎么去掉字符串里的space呢?