Skip to main content

mid

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

Returns: string

Table 1.

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



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)
{
}

Try the query

Table 2. Results

mid

d