Repeat a string: Difference between revisions

m
→‎{{header|VBA}}: a correction
(→‎{{header|PL/I}}: A correction)
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)
1,392

edits