LTRIM(string)

Returns the text string without leading spaces (String).


stringThe text string (String).

REMARKS
* If "string" is Null, then Null is returned.
* This function is similar to RTRIM function.
* You can use the LTRIM$ function to return a String data type instead of a Variant/String data type.
* The equivalent .NET function is Microsoft.VisualBasic.Strings.LTrim
* For the Microsoft documentation refer to docs.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) & "'" ''

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top