Skip to main content

trim

The string function used to trim any leading or trailing spaces from either end of a string.

Parameter

Type

value

string

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:trim("    foo    ") AS ?trim)
{
}

Run query

Results:

trim

foo