Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

fn:substring

Return substring of a string value.


Syntax

fn:substring(string $string, double $position) => string?
fn:substring(string $string, double $position, double $length) => string?

Top of page

Description

This function returns that part of $string, which begins at $position and is the number of characters indicated by length. More precisely, the function returns the characters in $string, whose position $p satisfies:

fn:round($position) <= $p < fn:round($position) + fn:round($length)

The following rules hold:

Top of page

Argument

$string

string value

$position

double value: the position at which the search takes place

$length

double value: the length of the substring

Top of page

Examples

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page