By bloid
via blog.stevenlevithan.com
Published: Feb 04 2008 / 17:22
Since JavaScript doesn't include a trim method natively, it's included by countless JavaScript libraries – usually as a global function or appended to String.prototype. However, I've never seen an implementation which performs as well as it could, probably because most programmers don't deeply understand or care about regex efficiency issues.
Tweet
SaveShareSend
Tags: javascript
Add your comment