chg: String.repeat() method is already provided by Rhino

This commit is contained in:
Tobi Schäfer 2020-03-21 10:25:26 +01:00
parent 9f213ab7b9
commit 265cf566b7

View file

@ -398,21 +398,6 @@ String.prototype.md5 = function() {
}; };
/**
* function repeats a string the specified amount of times
* @external
* @memberof {String}
* @param Int amount of repetitions
* @return String resulting string
*/
String.prototype.repeat = function(multiplier) {
res.push();
for (var i=0; i<multiplier; i++)
res.write(this);
return res.pop();
};
/** /**
* function returns true if the string starts with * function returns true if the string starts with
* the string passed as argument * the string passed as argument