<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.stringJoin.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.stringJoin</api:function-name><api:suggest>fn.stringjoin</api:suggest><api:suggest>fn</api:suggest><api:suggest>stringjoin</api:suggest><api:function-link mode="xquery" fullname="fn:string-join">/apidoc/8.0/fn:string-join.xml</api:function-link><api:function mode="javascript" name="stringJoin" type="builtin" lib="fn" category="StringBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.stringJoin"><api:summary>
<p xmlns="http://www.w3.org/1999/xhtml">
Returns an <code>xs:string</code> created by concatenating the members of
the $parameter1 sequence using $parameter2 as a separator. If the value of $arg2 is the
zero-length string, then the members of $parameter1 are concatenated without a
separator.
</p><p xmlns="http://www.w3.org/1999/xhtml">
If the value of $parameter1 is the empty sequence, the zero-length string is returned.
</p>
</api:summary><api:params><api:param name="parameter1" type="xs:string*"><api:param-description>
  A sequence of strings.
  </api:param-description><api:param-name>parameter1</api:param-name><api:param-type>String[]</api:param-type></api:param><api:param name="parameter2" type="xs:string"><api:param-description>
  A separator string to concatenate between the items in $parameter1.
  </api:param-description><api:param-name>parameter2</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>String</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
fn.stringJoin(["hello", "goodbye"], " and ");

=&gt; hello and goodbye
</pre>
</api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
var string = "this is a string";
fn.stringJoin(fn.tokenize(string, " "),
               "-");

=&gt; this-is-a-string
</pre>
</api:example></api:function></api:function-page>