Generating string consisting of the same character

Recently I’ve been asked by friend of mine, how to generate string consisting of 50 commas. I came up with these three code snippets:

Although all of these lines produce appropriate outcome, it’s seemed to me that there is some simpler way to accomplish this task. After a little bit of searching, it turned out, that it is possible to generate string consisting of same characters using one of string’s constructors

Generating string consisting of the same character