Javascript Trim
Posted by tech on
May 19, 2008
Javascript does not provide a trim() function so you would have to make on yourself. You can use this nifty pre-made function.
function trim(stringToTrim) {
return stringToTrim.replace(/^\s+|\s+$/g,"");
}





