136
rated 0 times
[
138]
[
2]
/ answers: 1 / hits: 76255
/ 13 Years ago, mon, october 3, 2011, 12:00:00
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.
More From » jquery