home contribute faq download

FunctX XQuery Functions

fn:substring-after

The substring after the first occurrence of a delimiter

Google
Webxqueryfunctions.com

Description

The fn:substring-after function extracts all the characters of a string ($arg1) that appear after the first occurrence of another specified string ($arg2).

This description is © Copyright 2007, Priscilla Walmsley. It is excerpted from the book XQuery by Priscilla Walmsley, O'Reilly, 2007. For a complete explanation of this function, please refer to Appendix A of the book.

Arguments and Return Type

NameTypeDescription
$arg1 xs:string? the entire string
$arg2 xs:string? the string to start the substring after
$collation xs:string the collation to use to compare strings
return value xs:string

Examples

XQuery ExampleResults
substring-after('query', 'u')
ery
substring-after('queryquery', 'ue')
ryquery
substring-after('query', 'y')
zero-length string
substring-after('query', 'x')
zero-length string
substring-after('query', '')
query
substring-after('', 'x')
zero-length string

See Also

functx:substring-after-lastThe substring after the last occurrence of a delimiter
functx:substring-after-last-matchThe substring after the last text that matches a regex
functx:substring-after-if-containsPerforms substring-after, returning the entire string if it does not contain the delimiter
fn:substringA substring based on a starting point and optional length
fn:substring-beforeThe substring before the first occurrence of a delimiter

History

Published OnLast UpdatedContributor(s)
2006-06-272007-02-26W3C, XQuery 1.0 and XPath 2.0 Functions and Operators, http://www.w3.org/TR/xpath-functions/
Datypic XQuery Services

Recommended Reading:

XQuery