.. _functx_insert-string: ==================== functx:insert-string ==================== Inserts a string at a specified position Description ~~~~~~~~~~~ The functx:insert-string function inserts a string ($stringToInsert) into another string ($originalString) at a specified position (which is 1-based). If the position is greater than the length of $originalString, it concatenates $stringToInsert at the end. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - originalString:string() - the original string to insert into * - stringToInsert:string() - the string to insert * - pos:integer() - the position Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:insert-string('xyz','def',2) - xdefyz * - functx:insert-string('xyz','def',5) - xyzdef * - functx:insert-string('xyz','',2) - xyz * - functx:insert-string('','def',2) - def See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_index-of-string`.