functx:repeat-string

Repeats a string a given number of times

Description

The functx:repeat-string function returns a string consisting of a given number of copies of $stringToRepeat concatenated together. To pad a string to a particular length, use the functx:pad-string-to-length function.

Parameters

Description

stringToRepeat:string()

the string to repeat

count:integer()

the desired number of copies

Examples

XPath

Results

functx:repeat-string(‘*’, 6)

functx:repeat-string(‘abc’, 3)

abcabcabc

See Also