Return to Snippet

Revision: 19883
at November 3, 2009 02:55 by Mithun


Initial Code
trimWS = function(str) {
    str = str.replace(/^\s*/, "");
    str = str.replace(/\s*$/, "");
    return str;
},

Initial URL


Initial Description


Initial Title
Trim string white spaces using regular expressions

Initial Tags
javascript

Initial Language
JavaScript