Nodejs String Remove remove( start, length )

Here you can find the source of remove( start, length )

Method Source Code

String.prototype.remove = function( start, length )
{
   var s = '' ;
   /*from   w  w w .  ja  v a  2 s  .c o m*/
   if ( start > 0 )
      s = this.substring( 0, start ) ;
   
   if ( start + length < this.length )
      s += this.substring( start + length , this.length ) ;
      
   return s ;
}

Related

  1. remove(idx)
    String.prototype.remove = function (idx) {
      var arr = this.split("");
      arr.splice(idx, 1);
      arr = arr.join('');
      arr = arr.toString();
      return arr;
    
  2. remove(substr)
    String.prototype.remove = function (substr) {
      return this.replace(substr, '');
    };
    
  3. removeAccents()
    String.prototype.removeAccents = function(){
        return this
            .toLowerCase()
            .replace(/[?gi,"a")
            .replace(/[?gi,"e")
            .replace(/[?gi,"i")
            .replace(/[?/gi,"o")
            .replace(/[?gi, "u")
            .replace(/[^a-zA-Z0-9]/g," ");
    ...
    
  4. removeAccents()
    String.prototype.removeAccents = function() {
      var diacritics = [
          [/[\300-\306]/g, 'A'],
          [/[\340-\346]/g, 'a'],
          [/[\310-\313]/g, 'E'],
          [/[\350-\353]/g, 'e'],
          [/[\314-\317]/g, 'I'],
          [/[\354-\357]/g, 'i'],
          [/[\322-\330]/g, 'O'],
    ...