src/js/libs/spiritual-gui.js
function strings() {
		extend(String.prototype, {
			trim: function() {
				return this.replace(/^\s*/, "").replace(/\s*$/, "");
			},
			repeat: function(n) {
				return new Array(n + 1).join(this);
			},
			startsWith: function(sub) {
				return this.indexOf(sub) === 0;
			},
			endsWith: function(sub) {
				sub = String(sub);
				var i = this.lastIndexOf(sub);
				return i >= 0 && i === this.length - sub.length;
			},
			contains: function(sub) {
				return this.indexOf(sub) > -1;
			},
			toArray: function() {
				return this.split("");
			}
		});
	}
function strings() {
		extend(String.prototype, {
			trim: function() {
				return this.replace(/^\s*/, "").replace(/\s*$/, "");
			},
			repeat: function(n) {
				return new Array(n + 1).join(this);
			},
			startsWith: function(sub) {
				return this.indexOf(sub) === 0;
			},
			endsWith: function(sub) {
				sub = String(sub);
				var i = this.lastIndexOf(sub);
				return i >= 0 && i === this.length - sub.length;
			},
			contains: function(sub) {
				return this.indexOf(sub) > -1;
			},
			toArray: function() {
				return this.split("");
			}
		});
	}
function strings ( ) { extend ( String . prototype , { trim : function ( ) { return this . replace ( / ^\s* / , "" ) . replace ( / \s*$ / , "" ) ; } , repeat : function ( n ) { return new Array ( n + 1 ) . join ( this ) ; } , startsWith : function ( sub ) { return this . indexOf ( sub ) === 0 ; } , endsWith : function ( sub ) { sub = String ( sub ) ; var i = this . lastIndexOf ( sub ) ; return i >= 0 && i === this . length - sub . length ; } , contains : function ( sub ) { return this . indexOf ( sub ) > - 1 ; } , toArray : function ( ) { return this . split ( "" ) ; } } ) ; }
Patching `String.prototype`
Patching String . prototype