Friday, June 8, 2018

Use PowerShell to Multiply Strings

Long, long ago, computers mastered the art of multiplying numbers. A more interesting trick is to multiply string. PowerShell can do this easily:

"winner " * 3







Note the trailing space at the end of the string. Without it, the text would all run together in an unbroken line.

 

No comments:

Post a Comment