FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. For more details, review the migration guide. Contact support@fauna.com with any questions. |
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 ] )
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! ', '==========' ]
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!