repeat
- 23 May 2023
-
DarkLight
-
PDF
repeat
- Updated on 23 May 2023
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
repeat Task Purpose
The repeat task is used to copy a string a specified number of times. A new string is constructed from the original string containing the specified number of copies concatenated together.
Potential Use Case
Suppose you have a name in a list, and you need to fill out predefined spaces with the same name. You could use this task to repeat the name as required.
Properties
Input and output parameters are shown below.
Incoming | Type | Description |
---|---|---|
str |
String | Required. The string to copy. |
count |
Number | Required. The number of times to repeat (copy) the string. |
Outgoing | Type | Description |
---|---|---|
repeatedString |
String | A new string containing the specified number of copies of the given string. |
Example
In this example, the incoming Reference variable is "Hello World" and the count
number is "2", which means the task will return a repeated copy of the str
variable two times.
The result of this task creates a new string that has been repeated the desired number of times; essentially the original str
followed by a repeated copy of itself: Hello WorldHello World
.
Was this article helpful?