title | titleSuffix | description | author | ms.author | ms.reviewer | ms.service | ms.subservice | ms.topic | ms.devlang | ms.date | ms.custom |
---|---|---|---|---|---|---|---|---|---|---|---|
RTRIM |
Azure Cosmos DB for NoSQL |
An Azure Cosmos DB for NoSQL system function that returns a string expression with trailing whitespace or specified characters removed. |
jcodella |
jacodel |
sidandrews |
cosmos-db |
nosql |
reference |
nosql |
02/27/2024 |
query-reference |
[!INCLUDENoSQL]
Returns a string expression after it removes trailing whitespace or specified characters.
RTRIM(<string_expr_1> [, <string_expr_2>])
Description | |
---|---|
string_expr_1 |
A string expression. |
string_expr_2 (Optional) |
An optional string expression to be trimmed from string_expr_1 . If not set, the default is to trim whitespace. |
Returns a string expression.
The following example shows how to use this function with various parameters inside a query.
:::code language="nosql" source="~/cosmos-db-nosql-query-samples/scripts/rtrim/query.sql" highlight="2-9":::
:::code language="json" source="~/cosmos-db-nosql-query-samples/scripts/rtrim/result.json":::
- This function doesn't use the index.