Trim leading spaces including tabs

后端 未结 4 994
醉酒成梦
醉酒成梦 2020-12-19 13:20

I need to read files using vbscript and remove all leading spaces including any tabs. I now LTRIM will remove the leading spaces but how do I remove tabs also.

Thank

4条回答
  •  天涯浪人
    2020-12-19 14:10

    Function LTrimEx(str)
        Do Until x
            If Left(str, 1) = Chr(32) Or Left(str, 1) = Chr(9) then
                str = Right(str, Len(str) - 1)
            Else
                x = true
            End If
        Loop
        LTrimEx = str
    End Function
    

提交回复
热议问题