Nodejs Utililty Methods String Remove

List of utility methods to do String Remove

Description

The list of methods to do String Remove are organized into topic(s).

Method

removeMascara()
String.prototype.removeMascara = function () {
    if (this.valueOf())
        return this.valueOf().replace(/\.|\/|-|_/g, "");
    return "";
removeMultipleWhitespaces()
String.prototype.removeMultipleWhitespaces = function () {
    return this.replace(/\s\s+/g, ' ');
};
removeNonAlphabeticCharacters()
String.prototype.removeNonAlphabeticCharacters = function() {
    var result = this.replace(/[^a-zA-Z ]/g, '');
    return result;
removeNonChars()
String.prototype.removeNonChars = function(){
  return this.replace(/[^a-zA-Z0-9 -]/gi, "");
};
removeNonWords()
String.prototype.removeNonWords = function () { 
  return this.replace(/[^\w|\s]/g, '');
removeQoutes()
String.prototype.removeQoutes = function() {
  return this.replace(/["']/g, "");
};
removeSpace()
String.prototype.removeSpace=function(){
  return this.replace(/\s/g, "");
removeSpaces()
String.prototype.removeSpaces = function() {
  return this.replace(/\s+/g, '');
};
String.prototype.hashCode = function(){
  var hash = 0;
    if (this.length == 0) return hash;
    for (var i = 0; i < this.length; i++) {
        char = this.charCodeAt(i);
        hash = ((hash<<5)-hash)+char;
...
removeSpaces()
String.prototype.removeSpaces = function() {
  return this.replace(/\s+/g, '');
};
removeSpacesAndToLower()
String.prototype.removeSpacesAndToLower = function () {
  return this.replace(/\s+/g, '-').toLowerCase();