Nodejs String Remove removeFromList(c)

Here you can find the source of removeFromList(c)

Method Source Code

String.prototype.removeFromList=function(c){
   var arr=this.split(c), i=1;
   for(;i<arguments.length;i++) delete arr[arguments[i]-1];
   return arr.filter(function(v){return v!==undefined}).join(c);
}

Related

  1. removeComma()
    String.prototype.removeComma = function() {
        return(this.replace(/,/g,''));
    
  2. removeDiacritics()
    String.prototype.removeDiacritics = function() {
        var result = this.replace(/i/g, 'i')
                    .replace(/?/, 'c');
        return result;
    
  3. removeDots()
    String.prototype.removeDots = function() {
      return this.replace(/\./g, '');
    };
    
  4. removeEndLine()
    String.prototype.removeEndLine = function() {
        var tmp = "";
        for(var i = 0, length = this.length; i < length; i++) {
            var c = this.charAt(i);
            if(c != "\n" && c != "\r") {
                tmp += c;
        return tmp;
    ...
    
  5. removeFileExtension()
    String.prototype.removeFileExtension = function()
        var re = /(.*)\.[^.]+$/;
        return re.test(this);
    
  6. removeMascara()
    String.prototype.removeMascara = function () {
        if (this.valueOf())
            return this.valueOf().replace(/\.|\/|-|_/g, "");
        return "";
    
  7. removeMultipleWhitespaces()
    String.prototype.removeMultipleWhitespaces = function () {
        return this.replace(/\s\s+/g, ' ');
    };
    
  8. removeNonAlphabeticCharacters()
    String.prototype.removeNonAlphabeticCharacters = function() {
        var result = this.replace(/[^a-zA-Z ]/g, '');
        return result;
    
  9. removeNonChars()
    String.prototype.removeNonChars = function(){
      return this.replace(/[^a-zA-Z0-9 -]/gi, "");
    };