RTRIM(string)

Returns the text string without trailing spaces (String).


stringThe text string (String).

REMARKS
* If "string" is Null, then Null is returned.
* This function is similar to LTRIM function.
* You can use the RTRIM$ function to return a String data type instead of a Variant/String data type.
* The equivalent .NET function is Microsoft.VisualBasic.Strings.RTrim
* For the Microsoft documentation refer to docs.microsoft.com

Debug.Print "'" & RTrim("   some text") & "'"            '   some text' 
Debug.Print "'" & RTrim(" some text ") & "'" ' some text'
Debug.Print "'" & RTrim("some text ") & "'" 'some text'
Debug.Print "'" & RTrim(LTrim(" some text ")) & "'" 'some text'
Debug.Print "'" & RTrim(Null) & "'" ''

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