Skip to main content

ltrim

The string function used to trim any leading spaces from the left of a string.

Parameter

Type

Description

str

string

the string from which to remove the leftmost spaces

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

Run query

Results:

ltrim

foo