RTrim Function

Returns the String data type passed with trailing (right side) whitespaces removed.

Syntax

result = RTrim( SourceString )

result = stringVariable.RTrim( )


Parameters

SourceString

String

The source, a copy of which, to be returned with trailing whitespaces removed.


Return Value

Result

String

SourceString with trailing whitespaces removed.



Notes

Rtrim uses the list of unicode "whitespace" characters at http://www.unicode.org/Public/UNIDATA/PropList.txt.


Examples

This example removes the whitespaces from the right side of the string passed:

Dim s as String
s=RTrim("  Hello World  ")  //Returns "  Hello World"

See Also

Asc, Chr, InStr, Len, Left, LTrim, Mid, Trim functions; String data type.