ascii()
chr()
ends_with()
index_of()
len()
lower()
ltrim()
mv_to_string()
number_to_string
replace()
rtrim()
starts_with()
string_to_number
substr()
trim()
upper()
Windowing Functions
coalesce
Previous Versions
Removes the specified characters from the end of a string.
rtrim(string,substr)
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.
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';