Repeat a string: Difference between revisions
no edit summary
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
No edit summary |
||
Line 482:
<code>s</code> tells the user that the program expects a string as input.
<code>i</code> tells the user that the program expects an integer as input.
=={{header|Beef}}==
<syntaxhighlight lang="csharp">
String s = new String('X', 5);
s.Replace("X", "ha");
</syntaxhighlight>
And for single character repeats
<syntaxhighlight lang="csharp">
String s1 = scope .();
s1.PadLeft(5, '*');
</syntaxhighlight>
=={{header|Befunge}}==
|