How can I most efficiently reduce additional spaces between character strings to just one space.
Ex:
From
"string1 string2 string3"
To
"string1 string2 string3"
This is for a database search where the the form submission is converted to an array of strings and queried against the db. The spaces throw a monkey wrench into the mix.
Ex:
From
"string1 string2 string3"
To
"string1 string2 string3"
This is for a database search where the the form submission is converted to an array of strings and queried against the db. The spaces throw a monkey wrench into the mix.