var trimmed = str.replace(/^\s+|\s+$/g, '') ;
that's all.
Subscribe to:
Post Comments (Atom)
A blog about programming tips, fix bugs, collection of answer-articles for some programming issues and more...
Coding experience share Copyright © 2010 | Designed by Ipietoon for Free Blogger Template
0 nhận xét:
Post a Comment