mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-22 03:45:25 +00:00
Monotone-Parent: b485f305175502819e660d9557bad5fa6d20222f
Monotone-Revision: a5370a41693bc2294eb25921c8e19dda7570a063 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-11T05:05:03 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -2,6 +2,15 @@ String.prototype.trim = function() {
|
||||
return this.replace(/(^\s+|\s+$)/g, '');
|
||||
}
|
||||
|
||||
String.prototype.formatted = function() {
|
||||
var newString = this;
|
||||
|
||||
for (var i = 0; i < arguments.length; i++)
|
||||
newString = newString.replace("%{" + i + "}", arguments[i], "g");
|
||||
|
||||
return newString;
|
||||
}
|
||||
|
||||
String.prototype.repeat = function(count) {
|
||||
var newString = "";
|
||||
for (var i = 0; i < count; i++) {
|
||||
|
||||
Reference in New Issue
Block a user