Nodejs String Remove removeChars()

Here you can find the source of removeChars()

Method Source Code

String.prototype.removeChars = function () {
       varReturnStr = "" ;
   /*from w  w  w.j  a v a  2 s  .  com*/
       for ( var inx = 0 ; inx < this.length ; inx++ ) {
           if ( this.substring( inx, inx+1 ) != "-")
              // if ( this.substring( inx, inx+1 ) != "-") - ??? ????? ?? ???? ????? ??? ? ??.
                       varReturnStr = varReturnStr + this.substring( inx, inx+1 ) ;
       }
   
       return varReturnStr;
}

Related

  1. removeBr()
    String.prototype.removeBr = function()
      return this.replace(/(<br \/>|<br>)/g, '');
    };
    
  2. removeBreakLine()
    String.prototype.removeBreakLine = function() { 
      return this.replace(/(\r\n|\n|\r)/gm," ");
    
  3. removeBreakTags()
    'use strict';
    var DEV_MODE = false;
    String.prototype.removeBreakTags = function() {
      var target = this;
      return target.replace(new RegExp('<br/>', 'g'), ' ');
    };
    
  4. removeChar(character)
    String.prototype.removeChar = function (character) {
          return this.replaceAll(character, "");
    
  5. removeCharacters()
    String.prototype.removeCharacters = function() {
      var twoStrings = this.split(", "),
      array2 = twoStrings[1],
      array1= twoStrings[0],
      temp = "";
      for (var i = 0, length = array2.length; i < length; i++) {
        for (var j = 0, l = array1.length; j < l; j++) {
          if (array1[j] == array2[i]) {
            array1 = array1.remove(j);
    ...
    
  6. removeClasses(s)
    String.prototype.removeClasses = function(s)
        return this.replace(/style="[^"]*"|class="[^"]*"/gi, "");
    
  7. removeComma()
    String.prototype.removeComma = function() {
        return(this.replace(/,/g,''));
    
  8. removeDiacritics()
    String.prototype.removeDiacritics = function() {
        var result = this.replace(/i/g, 'i')
                    .replace(/?/, 'c');
        return result;
    
  9. removeDots()
    String.prototype.removeDots = function() {
      return this.replace(/\./g, '');
    };