Skip to main content

rtrim

The string function used to trim any trailing spaces from the right of a string.

Parameter

Type

Description

str

string

the string to remove the rightmost spaces of

Returns: string

Example

Query:

PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-function-sample-queries/>
PREFIX fn: <http://data.world/function/functions#>
SELECT (fn:rtrim("foo    ") AS ?rtrim)
{
}

Run query

Results:

rtrim

foo