LTRIM |
LTRIM(string) |
Returns the text string without leading spaces (Variant / String). |
string | The text string (String). |
REMARKS |
* If "string" is Null, then Null is returned. * This function is similar to RTRIM function. * You can use the LEFT function to return a number of characters from the left of a string. * You can use the LTRIM$ function to return a String data type instead of a Variant data type. * You can use the RTRIM function to returns a text string without trailing spaces. * You can use the TRIM function to return a text string without leading and trailing spaces. * The equivalent .NET function is [[Microsoft.VisualBasic.Strings.LTrim]] * For the Microsoft documentation refer to learn.microsoft.com |
Debug.Print "'" & LTrim("some text ") & "'" '= 'some text '
Debug.Print "'" & LTrim(" some text ") & "'" '= 'some text '
Debug.Print "'" & LTrim(" some text") & "'" '= 'some text'
Debug.Print "'" & LTrim(RTrim(" some text ")) & "'" '= 'some text'
Debug.Print "'" & LTrim(Null) & "'" '= ''
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top