The substring() function returns part of a string value, determined by character positions within the string. Character positions are counted from one.
For example, the expression «substring('Goldfarb', 5, 3) » returns the string «far » .
Argument | Data Type | Meaning |
---|---|---|
input | xs:string? | The containing string |
start | xs:double | The position in the containing string of the first character to be included in the result string |
length (optional) | xs:double | The number of characters to be included in the result string If the argument is omitted, characters are taken from the start position up to the end of the containing string. |
Result | xs:string | The required substring of the containing string |