Repeat
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
Repeat( value, [ number ] )
repeat( value, [ number ] )
Repeat( value, [ number ] )
Repeat( value, [ number ] )
Repeat( value, [ number ] )
Repeat( value, [ number ] )
Description
The Repeat
function returns a string consisting of the value
string repeated number
times.
Parameters
Parameter | Type | Definition and Requirements |
---|---|---|
|
String |
The String to repeat. |
|
Number |
Optional - The Number of times that the |
Examples
The following query executes an array of independent repeat operations and returns the results in an array. The result array position matches the execution array position. The individual operations are:
-
The string
Yes
is concatenated with itself. The result stringYesYes
is placed in the top position of the result array. -
The string
Yes!
, containing a trailing space, is repeated 3 times. The result stringYes! Yes! Yes!
is placed in the second position of the result array. -
The string
=
is repeated 10 times. The result string==========
is placed in the third position of the result array.
[ 'YesYes', 'Yes! Yes! Yes! ', '==========' ]
['YesYes', 'Yes! Yes! Yes! ', '==========']
[YesYes Yes! Yes! Yes! ==========]
Arr(StringV(YesYes), StringV(Yes! Yes! Yes! ), StringV(==========))
["YesYes", "Yes! Yes! Yes! ", "=========="]
[ 'YesYes', 'Yes! Yes! Yes! ', '==========' ]