.. _functx_pad-string-to-length: =========================== functx:pad-string-to-length =========================== Completa uma string até o tamanho desejado Descrição ~~~~~~~~~ A função functx:pad-string-to-length devolve $stringToPad seguida de repetições de $padChar até ficar com o tamanho $length. Se $stringToPad for maior que $length, a função corta a string. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parâmetros** - **Descrição** * - stringToPad:string() - a string a completar * - padChar:string() - o caractere (ou os caracteres) usado para completar * - length:integer() - o tamanho desejado Exemplos ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Resultado** * - functx:pad-string-to-length('abc', '\*', 6) - abc\*\*\* * - functx:pad-string-to-length('abcdef', '\*', 4) - abcd * - functx:pad-string-to-length('', '\*', 4) - \*\*\*\* Veja também ~~~~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_pad-integer-to-length`. * :ref:`functx_repeat-string`.