且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

修剪前导空格,包括制表符

更新时间:2022-11-11 22:30:04

此函数从字符串中删除所有前导空格(空格、制表符等):

This function removes all leading whitespace (spaces, tabs etc) from a string:

Function LTrimEx(str)
  Dim re
  Set re = New RegExp
  re.Pattern = "^\s*"
  re.Multiline = False
  LTrimEx = re.Replace(str, "")
End Function