Remove Letter from String from start by length - Node.js String

Node.js examples for String:Strip

Description

Remove Letter from String from start by length

Demo Code


String.prototype.remove = function( start, length )
{
  var s = '' ;
  
  if ( start > 0 )
    s = this.substring( 0, start ) ;//  ww w .j a  va  2s . co  m
  
  if ( start + length < this.length )
    s += this.substring( start + length , this.length ) ;
    
  return s ;
}

Related Tutorials