Public Function RTrim(ByVal InputString As String, Optional ByVal RemoveAllWhitespaceCharacters As Boolean = False) As String
Returns the specified string with trailing spaces/white space removed.
String lText = " Hello world "
SendDebug($"[{lText}]") 'Prints '[ Hello world ]'
SendDebug($"[{Trim(lText)}]") 'Prints '[Hello world]'
SendDebug($"[{Lrim(lText)}]") 'Prints '[Hello world ]'
SendDebug($"[{Rrim(lText)}]") 'Prints '[ Hello world]'