RosettaCodeData/Task/Repeat-a-string/00DESCRIPTION

7 lines
325 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
Take a string and repeat it some number of times.
Example: repeat("ha", 5)   =>   "hahahahaha"
2013-04-10 23:57:08 -07:00
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) => "*****").
2016-12-05 22:15:40 +01:00
<br><br>