Repeat()
Table of Contents
Overview
The repeat() function returns a text with the input text repeated for the specified number of times.
Note: The size of each input and output parameter of this function can individually be up to 100K characters.
Return Type
- TEXT
Syntax
<variable> = <inputText>.repeat(<repeatCount>);
(OR)
<variable> = repeat(<inputText>, <repeatCount>);
Parameter | Data type | Description |
---|---|---|
<variable> | TEXT | Variable which will contain the returned text. |
<inputText> | TEXT | The text that will be repeated for the specified number of times |
<repeatCount> | NUMBER | The number of times the inputText will be repeated. |
Example
The following example returns a text with the input text - Zoho repeated for 3 times.
inputText = "Zoho"; outputText = inputText.repeat(3); info outputText; // Returns ZohoZohoZoho