Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
7
Task/Repeat-a-string/VBScript/repeat-a-string.vb
Normal file
7
Task/Repeat-a-string/VBScript/repeat-a-string.vb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
' 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")
|
||||
Loading…
Add table
Add a link
Reference in a new issue