/ Published in: JavaScript
Expand |
Embed | Plain Text
trimWS = function(str) { str = str.replace(/^\s*/, ""); str = str.replace(/\s*$/, ""); return str; },
You need to login to post a comment.
Mithun on 11/03/09
javascript trim white space String regular Expression
1 person have marked this snippet as a favorite
trimWS = function(str) { str = str.replace(/^\s*/, ""); str = str.replace(/\s*$/, ""); return str; },
You need to login to post a comment.