Javascript String toHtmlString()

Description

Javascript String toHtmlString()


String.prototype.toHtmlString = function() {
  return this.replace(/"/g, '"');
};

Javascript String toHtmlString()

String.prototype.toHtmlString = function() {
  return this.replace(/"/g, '"');
};

Valley.substr = function(str, len) {
  if (!str) {/*  w  ww  .j  ava  2  s  .c o m*/
    return str;
  }
  var len = len || 18;
  return str.length > len ? (str.substr(0, len) + '...') : str;
};



PreviousNext

Related