The string to trim. The argument can be any valid expression that resolves to a string. For more information on expressions, see Expressions.
The character(s) to trim from the beginning of the input.
The argument can be any valid expression that resolves to a string. The $rtrim operator breaks down the string into individual UTF code point to trim from input.
If unspecified, $rtrim removes whitespace characters, including the null character. For the list of whitespace characters, see Whitespace Characters.
Generated using TypeDoc
Removes whitespace or the specified characters from the end of a string.
4.0
https://docs.mongodb.com/manual/reference/operator/aggregation/rtrim/#mongodb-expression-exp.-rtrim