Repeat a string: Difference between revisions

Content added Content deleted
m (→‎{{header|VBA}}: a correction)
m (→‎{{header|VBA}}: To fit task)
Line 2,156: Line 2,156:
End Function
End Function


print RepeatSTr( "Hello world!", 3)</lang>
Debug.Print RepeatStr("ha", 5)</lang>
{{out}}
{{out}}
<pre>
<pre>
hahahahaha
Hello world!Hello world!Hello world!
</pre>
</pre>
''Note:'' "String(5, "ha") in VBA produces "hhhhh" (only the first character is repeated)!
''Note:'' "String(5, "ha") in VBA produces "hhhhh" (only the first character is repeated)!