Javascript Trim String
2008 December 23
You can find this or something similar nearly anywhere by simply googling it, the only reason why i’m blogging this is so I don’t have to google it. So, here it is, the javascript trim string function.
function TrimString(str) {
return str.replace(/^\s+|\s+$/g, '');
}
.matti