<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.position.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.position</api:function-name><api:suggest>xdmp.position</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>position</api:suggest><api:function-link mode="xquery" fullname="xdmp:position">/apidoc/8.0/xdmp:position.xml</api:function-link><api:function mode="javascript" name="position" type="builtin" lib="xdmp" category="Extension" subcategory="Extension" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.position"><api:summary>
  Returns an integer value representing the starting position of a
  string within the search string. Note, the string starting position is 1.
  If the first parameter is empty, the result is the empty sequence.
</api:summary><api:params><api:param name="test" type="xs:string?"><api:param-description>
  The string to test for existence in the second parameter.
  </api:param-description><api:param-name>test</api:param-name><api:param-type>String?</api:param-type></api:param><api:param name="target" type="xs:string?"><api:param-description>
  The string from which to test.
  </api:param-description><api:param-name>target</api:param-name><api:param-type>String?</api:param-type></api:param><api:param name="collation" type="xs:string?" optional="true"><api:param-description>
The optional name of a valid collation URI.  For information on the
collation URI syntax, see the <em xmlns="http://www.w3.org/1999/xhtml">Search Developer's Guide</em>.
  </api:param-description><api:param-name>collation</api:param-name><api:param-type>String?</api:param-type></api:param></api:params><api:return>Number?</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.position("chin","searchintext");

=&gt; 5
</pre></api:example></api:function></api:function-page>