Javascript String urlify()

Description

Javascript String urlify()


String.prototype.urlify = function() {
  return this.trim().split(' ').join('%20');
}

Javascript String urlify()

String.prototype.urlify = function() {
  return this.split(' ').reverse().trimSide().reverse().trimSide().join('%20');
}



PreviousNext

Related