<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.endsWith.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.endsWith</api:function-name><api:suggest>fn.endswith</api:suggest><api:suggest>fn</api:suggest><api:suggest>endswith</api:suggest><api:function-link mode="xquery" fullname="fn:ends-with">/apidoc/8.0/fn:ends-with.xml</api:function-link><api:function mode="javascript" name="endsWith" type="builtin" lib="fn" category="StringBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.endsWith"><api:summary>
 Returns <code xmlns="http://www.w3.org/1999/xhtml">true</code> if the first parameter ends with the string
 from the second parameter, otherwise returns <code xmlns="http://www.w3.org/1999/xhtml">false</code>.
</api:summary><api:params><api:param name="parameter1" type="xs:string?"><api:param-description>
  The parameter from which to test.
  </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>
  The string to test whether it is at the end of the first parameter.
  </api:param-description><api:param-name>parameter2</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>Boolean</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
fn.endsWith("this is a string", "a string");

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