.. _functx_word-count: ================= functx:word-count ================= The number of words Description ~~~~~~~~~~~ The functx:word-count function returns the number of words in a string(or node that is atomized). Word boundaries are determined by the definition of "word characters" in Unicode. If $arg is the empty sequence, it returns zero. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - arg:string() - Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:word-count('hello there world') - 3 * - functx:word-count(' hello world ') - 2 * - functx:word-count('a.b.c') - 3 See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_line-count`. * :ref:`functx_contains-word`.