Javascript String replaceTuple(tag,repalcement)

Description

Javascript String replaceTuple(tag,repalcement)




String.prototype.replaceTuple=function(tag,repalcement){
  var _this=this/*  w w  w  .  j  a v a  2 s  . c o m*/
  for(var i in tag){
   _this=_this.replace(tag[i],repalcement[i])
  }
  return _this
}



PreviousNext

Related