Here you can find the source of removeSpaces()
String.prototype.removeSpaces = function() { return this.replace(/\s+/g, ''); }; String.prototype.hashCode = function(){ var hash = 0;//from w ww . j av a 2s. c o m if (this.length == 0) return hash; for (var i = 0; i < this.length; i++) { char = this.charCodeAt(i); hash = ((hash<<5)-hash)+char; hash = hash & hash; // Convert to 32bit integer } return hash; };
String.prototype.removeNonAlphabeticCharacters = function() { var result = this.replace(/[^a-zA-Z ]/g, ''); return result;
String.prototype.removeNonChars = function(){ return this.replace(/[^a-zA-Z0-9 -]/gi, ""); };
String.prototype.removeNonWords = function () { return this.replace(/[^\w|\s]/g, '');
String.prototype.removeQoutes = function() { return this.replace(/["']/g, ""); };
String.prototype.removeSpace=function(){ return this.replace(/\s/g, "");
String.prototype.removeSpaces = function() { return this.replace(/\s+/g, ''); };
String.prototype.removeSpacesAndToLower = function () { return this.replace(/\s+/g, '-').toLowerCase();
String.prototype.removeSpecialCharacter = function(){ return this.replace(/[^a-zA-Z0-9_]/g, '');
String.prototype.removeSubstring = function(a, b){ var array = this.split(""); var w = 0; var str = []; if (b !== undefined){ array.forEach(function (elm) { if (elm === a & w < b){ w += 1; } else { ...