Repeat Text
Uncontrolled node
Overview
The Repeat Text node takes an input string and repeats it a specified number of times, outputting the concatenated result. This is useful for generating repetitive patterns, creating padding, or duplicating text blocks.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Text | Text | The string to be repeated. | - |
| Count | Number | The number of times to repeat the text. Must be a non-negative integer (decimals are floored). | 0 |
Outputs
| Output | Type | Description |
|---|---|---|
| Output | Text | The resulting text with the input string repeated the specified number of times. |
Runtime Behavior and Defaults
- If the Text input is not a valid string, the node outputs an empty string.
- If the Count input is not a valid number, it defaults to
0. - The count value is floored to the nearest integer (e.g.,
2.7becomes2). - Negative count values are treated as
0. - The node uses JavaScript's native string repetition logic, concatenating the text exactly as provided (including any whitespace).
Example
Repeating a word:
- Text:
"Hello " - Count:
3 - Output:
"Hello Hello Hello "
Creating a line separator:
- Text:
"-" - Count:
20 - Output:
"--------------------"