How to trim a string in Javascript
This is the best trim function for JavaScript that I found while surfing the net.var trimmed = str.replace(/^\s+|\s+$/g, '') ;source
I want to change the world but they won't give me the source code.
var trimmed = str.replace(/^\s+|\s+$/g, '') ;source
0 comments:
Post a Comment