Skip to main content

mid

The string function used to extracts a string from the middle of a string, given a starting index (1-based) and a length.

Parameter

Type

Description

str

string

the string from which to extract

start

integer

the position of the first character to extract

length

integer

the length of thing to extract

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

Run query

Results:

mid

d