Skip to main content

substring

The string function used to extract a substring from a string, given a starting index (1-based) and an optional length.

Returns: string

Table 1.

Parameter

Type

str

the string from which to extract

start

the position of the first character to extract

length

the length of substring to extract



Example

Query

PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-function-sample-queries/>
PREFIX fn: <http://data.world/function/functions#>

SELECT (fn:substring("asdf", 2, 3) AS ?substring)
{
}
Table 2. Results

substring

sdf