.. _functx_is-a-number: ================== functx:is-a-number ================== Whether a value is a numeric Description ~~~~~~~~~~~ The functx:is-a-number function returns true if the value is number(can be cast to a numeric type) and its not the value NaN. If the argument is the empty sequence or a zero-length string, it returns false. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - value:numeric() - the value to test Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:is-a-number('123') - true * - functx:is-a-number(123) - true * - functx:is-a-number(' 123 ') - true * - functx:is-a-number('') - false * - functx:is-a-number('123abc') - false * - functx:is-a-number('NaN') - false * - functx:is-a-number($in-xml/a) - true * - functx:is-a-number($in-xml/b) - false See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`number`.