home contribute faq download

FunctX XSLT Functions

fn:string-join

Concatenates a sequence of strings using an optional separator

Google
Webdatypic.com

Description

The fn:string-join function concatenates a sequence of strings. The $arg1 argument specifies the sequence of strings to concatenate, while $arg2 specifies the separator. If $arg2 is a zero-length string, no separator is used.

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 sequence of strings to join
$arg2 xs:string the delimiter
return value xs:string

Examples

XPath ExampleResults
string-join( ('a', 'b', 'c'), '')
abc
string-join( ('a', 'b', 'c'), '/*')
a/*b/*c
string-join( ('a', '', 'c'), '/*')
a/*/*c
string-join( 'a', '/*')
a
string-join((), '/*')
zero-length string

See Also

fn:concatConcatenates two or more strings

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 XSLT Services

Recommended Reading:

XQuery