RosettaCodeData/Task/Repeat-a-string/00-TASK.txt
2023-07-01 13:44:08 -04:00

10 lines
351 B
Text

Take a string and repeat it some number of times.
Example: repeat("ha", 5)   =>   "hahahahaha"
If there is a simpler/more efficient way to repeat a single “character” (i.e. creating a string filled with a certain character), you might want to show that as well (i.e. repeat-char("*", 5) => "*****").
{{Template:Strings}}
<br><br>