Javascript String parseHashtag(preUrl)

Description

Javascript String parseHashtag(preUrl)


String.prototype.parseHashtag = function(preUrl) {
  return this.replace(/[#]+\w+/g, function(t) {
    var tag = t.replace("#", "");
    return t.link(preUrl + tag) + " ";
  });/* w  ww.  j  a va  2 s  .  com*/
};



PreviousNext

Related