chg: String.repeat() method is already provided by Rhino
This commit is contained in:
parent
9f213ab7b9
commit
265cf566b7
1 changed files with 0 additions and 15 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue