RTRIM (Azure Cosmos DB)

Returns a string expression after it removes trailing blanks.

Syntax

RTRIM(<str_expr>)  

Arguments

str_expr
Is any valid string expression.

Return types

Returns a string expression.

Examples

The following example shows how to use RTRIM inside a query.

SELECT RTRIM("  abc") AS r1, RTRIM("abc") AS r2, RTRIM("abc   ") AS r3  

Here is the result set.

[{"r1": "   abc", "r2": "abc", "r3": "abc"}]  

Remarks

This system function will not utilize the index.

Next steps