Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Wednesday, April 2, 2008

How to trim a string in javascript

How to trim a string in javascript:

var trimmed = str.replace(/^\s+|\s+$/g, '') ;

1 comment:

Anonymous said...

Hi Everybody!

i've been trying to figure out a place to begin the acai free trial and was just wondering if anybody had any thoughts on whether or not it works for weight loss? So far here's the only [url=]article[/url] I've been able to come across that seemed real for what my goals are. Thoughts?