R
Raterus
Hi,
I'm looking for ideas for the most efficient way to accomplish this. I have a string representing names a person goes by.
"John Myers Joe John Myers"
And I need to parse it in such a way that I end up with an array of UNIQUE strings that appear in the original string (In no particular order)
arr(0) = "John"
arr(1) = "Myers"
arr(2) = "Joe"
One way I can think of is to use a hashtable and add the words like they were keys, then just iterate through the end result, The results should be unique, but I'm not sure that would be the best method for performance.
Thanks for any ideas!
--Michael
I'm looking for ideas for the most efficient way to accomplish this. I have a string representing names a person goes by.
"John Myers Joe John Myers"
And I need to parse it in such a way that I end up with an array of UNIQUE strings that appear in the original string (In no particular order)
arr(0) = "John"
arr(1) = "Myers"
arr(2) = "Joe"
One way I can think of is to use a hashtable and add the words like they were keys, then just iterate through the end result, The results should be unique, but I'm not sure that would be the best method for performance.
Thanks for any ideas!
--Michael