Perl里这样就行了:
[usr@ ~]# perl -we "print 'test' x 5" testtesttesttesttest
String.prototype.repeat = function( num ){ return new Array( num + 1 ).join( this ); } 'abc'.repeat(10)
标签
查看
218 次