Skip to main content

left

The string function used to find the n leftmost characters of a string.

Parameter

Type

Description

string

string

the string from which to take the leftmost characters

num_chars 

integer

the number of characters to get

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:left("asdf", 2) AS ?left)
{
}

Run query

Results:

left

as