In Perl I can repeat a character multiple times using the syntax:
$a = \"a\" x 10; // results in \"aaaaaaaaaa\"
Is there a simple way to ac
Can be used as a one-liner too:
function repeat(str, len) { while (str.length < len) str += str.substr(0, len-str.length); return str; }