Repeat a string: Difference between revisions
m
→{{header|VBA}}: a correction
PatGarrett (talk | contribs) (→{{header|PL/I}}: A correction) |
PatGarrett (talk | contribs) m (→{{header|VBA}}: a correction) |
||
Line 2,162:
</pre>
''Note:'' "String(5, "ha") in VBA produces "hhhhh" (only the first character is repeated)!
<p>An alternative method:
<lang vba>Public Function RepeatString(stText As String, iQty As Integer) As String
RepeatString = Replace(String(iQty, "x"), "x", stText)
|