It is an easy question and it's something that I can do easily.
Anyway, I'd like to know
Is there a function to remove white spaces on a string?
leaving just 1 space
Something like this
"Hello World!" -> "Hello World!"
Using the trim function removes the beginning and ending spaces, but Id like to remove all the white spaces excepting those that are between words leaving just 1
Anyway, I'd like to know
Is there a function to remove white spaces on a string?
leaving just 1 space
Something like this
"Hello World!" -> "Hello World!"
Using the trim function removes the beginning and ending spaces, but Id like to remove all the white spaces excepting those that are between words leaving just 1