Repeat a string: Difference between revisions

(→‎{{header|Delphi}}: Adds Déjà Vu example)
Line 1,397:
RepeatString = Replace(String(iQty, "x"), "x", stText)
End Function</lang>
 
=={{header|VBScript}}==
{{works with|Windows Script Host|*}}
<lang VBScript>
' VBScript has a String() function that can repeat a character a given number of times
' but this only works with single characters (or the 1st char of a string):
WScript.Echo String(10, "123") ' Displays "1111111111"
 
' To repeat a string of chars, you can use either of the following "hacks"...
WScript.Echo Replace(Space(10), " ", "Ha")
WScript.Echo Replace(String(10, "X"), "X", "Ha")
</lang>
 
=={{header|Vedit macro language}}==
Anonymous user