.. _functx_substring-before-last: ============================ functx:substring-before-last ============================ O trecho antes da última ocorrência de um delimitador Descrição ~~~~~~~~~ A função functx:substring-before-last devolve a parte de $arg que vem antes da última ocorrência de $delim. Se $arg não contiver $delim, devolve uma string vazia. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parâmetros** - **Descrição** * - arg:string() - a string de onde tirar o trecho * - delim:string() - o delimitador Exemplos ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Resultado** * - functx:substring-before-last('abc-def-ghi', '-') - abc-def * - functx:substring-before-last('abcd-abcd', 'ab') - abcd- * - functx:substring-before-last('abcd-abcd', 'x') - zero-length string Veja também ~~~~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`substring-before`. * :ref:`functx_substring-before-if-contains`. * :ref:`functx_substring-after-last`.