Repeat a string: Difference between revisions
Content added Content deleted
(→{{header|Java}}: no functions in Java) |
|||
Line 343: | Line 343: | ||
puts(1,repeat_string('*',5) & '\n') -- *****</lang> |
puts(1,repeat_string('*',5) & '\n') -- *****</lang> |
||
Sample Output: |
|||
<pre> |
|||
hahahahaha |
|||
*****</pre> |
|||
<lang Euphoria>-- Here is an alternative method for "Repeat a string" |
|||
include std/sequence.e |
|||
printf(1,"Here is the repeated string: %s\n", {repeat_pattern("ha",5)}) |
|||
printf(1,"Here is another: %s\n", {repeat_pattern("*",5)}) |
|||
</lang> |
|||
Sample Output: |
|||
<pre> |
|||
Here is the repeated string: hahahahaha |
|||
Here is another: *****</pre> |
|||
=={{header|F_Sharp|F#}}== |
=={{header|F_Sharp|F#}}== |