.. _functx_substring-after-if-contains: ================================== functx:substring-after-if-contains ================================== Performs substring-after, returning the entire string if it does not contain the delimiter Description ~~~~~~~~~~~ The functx:substring-after-if-contains function performs substring-after, returning the entire string if it does not contain the delimiter. It differs from the built-in fn:substring-after function, which returns a zero-length string if the delimiter is not found. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - arg:string() - the string to substring * - delim:string() - the delimiter Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:substring-after-if-contains('abcd','b') - cd * - functx:substring-after-if-contains('abcd','x') - abcd See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`substring-after`. * :ref:`functx_substring-after-last`. * :ref:`functx_substring-after-last-match`. * :ref:`functx_substring-before-if-contains`.