RTRIM
Removes characters from the end (right side) of a string.
This function corresponds to the rtrim(X, Y) function in SQLite.
If only one argument
columnis provided, it removes trailing spaces from the string.If the optional
trimCharsargument is provided, it removes any character present intrimCharsfrom the end of the string incolumn.
If the input column is not a string, it is first coerced into one. A NULL input results in a NULL output.
Example
// Removes trailing spaces: rtrim('hello ') -> 'hello'
select(RTRIM(StringLiteral("hello "))).execute()
// Removes specified trailing characters: rtrim('hello--**', '*-') -> 'hello'
select(RTRIM(StringLiteral("hello--**"), "*-")).execute()
// Using a column
select(RTRIM(Users.username)).from(Users)Content copied to clipboard
Return
A KQLiteColumn of type String containing the trimmed string.
Author
MOHAMMAD AZIM ANSARI
Parameters
column
The column or string value from which to trim characters.
trim Chars
An optional string containing the set of characters to remove from the right. If null or omitted, spaces are trimmed.