14 September, 2012

javascript trim

return str.replace(/^\s+|\s+$/g, '');

No comments:

Post a Comment