Repeat a string: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
No edit summary |
||
Line 482: | Line 482: | ||
<code>s</code> tells the user that the program expects a string as input. |
<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. |
<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}}== |
=={{header|Befunge}}== |