RTrim - Built-in String Function¶
Purpose¶
RTrim returns a string with trailing spaces removed.
Syntax¶
RTrim(str)
Arguments¶
| Argument | Required | Description |
|---|---|---|
str |
Yes | Any valid string expression from which the spaces will be removed. |
Returns¶
String
Example¶
Let sTest = " Hello World " // contains 4 spaces, "Hello World", 4 spaces
Return TRrim(sTest) // returns " Hello World"
// four spaces at the start are still there
See Also¶
Notes¶
- When
strcannot be converted to a string, a runtime error is generated. - When concatenating two strings, the minus operator performs a RTrim on the 1st string.