How can I remove all extra space between words in a string literal?
"some value" Should become
"some value" Also,
" This should become something else too . " Becomes
"This should become something else too ." Do not worry about moving the .. Just as above is fine. I know I can use $.trim(str) to achieve the trailing/ending space removal. But, I'm not sure how to do the 1 space between words trick.
$.trim(). Also, I learn a lot more from SO than I do from a search engine.