Repeat a string: Difference between revisions

Content added Content deleted
No edit summary
Line 2: Line 2:


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) => "*****").
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) => "*****").

=={{header|4DOS Batch}}==
<lang 4DOS Batch></lang>
Output shows:
<pre></pre>


=={{header|ActionScript}}==
=={{header|ActionScript}}==
Line 22: Line 27:
return tmp + tmp;
return tmp + tmp;
}</lang>
}</lang>

=={{header|Ada}}==
=={{header|Ada}}==
In [[Ada]] multiplication of an universal integer to string gives the desired result. Here is an example of use:
In [[Ada]] multiplication of an universal integer to string gives the desired result. Here is an example of use: