Platinum Partner

JavaScript Trim Prototype

Trim function prototype:

String.prototype.trim = function() {
  return this.replace(/^\s+|\s+$/g,"");
}


Example:

var mystring = " hello world ";
alert("[" + mystring.trim() + "]");
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}