Javascript Trim function

function trim(s){
	return s.replace(/^\s*(.*?)\s*$/,"$1");
}
PG

Author: insic

Subscribe in my RSS Feed for more updates on Web Design and Development related articles. Follow me on twitter or drop a message to my inbox.

Random Post

Delicious

No comments yet... Be the first to leave a reply!

Leave a Reply