.. _ends-with: ========= ends-with ========= Whether one string ends with another Description ~~~~~~~~~~~ The fn:ends-with function returns an xs:boolean value indicating whether one string ($arg1) ends with the characters of a second string ($arg2). Trailing whitespace is significant, so you may want to use the fn:normalize-space function to trim the strings before using this function. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - arg1:string() - the entire string to test * - arg2:string() - the substring to check for * - collation:string() - the collation to use for comparing Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - ends-with('query', 'y') - true * - ends-with('query', 'query') - true * - ends-with('query', '') - true * - ends-with('query ', 'y') - false * - ends-with('', 'y') - false See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`starts-with`. * :ref:`contains`.