Hi All,
I have a string like this:
100 Some Street Newark DE 19999
I need to remove any empty spaces that are 2 or more in length and replace them with 1 empty space. So the above example would look like this:
100 Some Street Newark DE 19999 (there should only be 1 space between each word or value)
The string is actually split into an array, but since I use a blank space to split the string, I would get an array that has a lot of empty items due to the number of spaces between the state & zip value.
One thought was to loop thru the array and remove any balnk of null items. But I don't know the code to remove an item from the array.
Additionally, this would mean that I would have to loop thru every array. And there will be a lot of records.
Is there a way to strip out the multi empty spaces before I split the string into the array?
Thanks,
Mark
I have a string like this:
100 Some Street Newark DE 19999
I need to remove any empty spaces that are 2 or more in length and replace them with 1 empty space. So the above example would look like this:
100 Some Street Newark DE 19999 (there should only be 1 space between each word or value)
The string is actually split into an array, but since I use a blank space to split the string, I would get an array that has a lot of empty items due to the number of spaces between the state & zip value.
One thought was to loop thru the array and remove any balnk of null items. But I don't know the code to remove an item from the array.
Additionally, this would mean that I would have to loop thru every array. And there will be a lot of records.
Is there a way to strip out the multi empty spaces before I split the string into the array?
Thanks,
Mark