Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

rtrim()

Removes the specified characters from the end of a string.

Syntax

rtrim(string,substr)

Usage

Removes every instance of each character in substr from the end of string. This function is case-sensitive. To remove trailing spaces, do not specify a value for substr.

Example

This example shows that rtrim removes the specified characters from the end of a string. This function is case-sensitive.

1q = load "test";
2q = foreach q generate 'Company' as 'Company', rtrim('Company',"abc") as 'rtrim abc',
3    rtrim('Company',"cba") as 'rtrim cba', rtrim('Company',"ab") as 'rtrim ab', 
4    rtrim('Company',"ac") as 'rtrim ac';

Diagram showing number of close opps, grouped by day of the week they were closed.