.. _ends-with: ========= ends-with ========= Se uma string termina com outra Descrição ~~~~~~~~~ A função fn:ends-with devolve um xs:boolean que diz se uma string ($arg1) termina com os caracteres de outra ($arg2). Os espaços no fim contam, então pode valer a pena usar fn:normalize-space para aparar as strings antes. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parâmetros** - **Descrição** * - arg1:string() - a string inteira a testar * - arg2:string() - o trecho a procurar * - collation:string() - a collation usada para comparar Exemplos ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Resultado** * - ends-with('query', 'y') - true * - ends-with('query', 'query') - true * - ends-with('query', '') - true * - ends-with('query ', 'y') - false * - ends-with('', 'y') - false Veja também ~~~~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`starts-with`. * :ref:`contains`.