Javascript String rotate(numchars)

Description

Javascript String rotate(numchars)


String.prototype.rotate = function (numchars) { 
  return this.substr(numchars, this.length-numchars) + this.substr(0,numchars);
}



PreviousNext

Related