Is there any method to do intersection on String. Say I have a string:
str = car, apple, car, pencil, orange, apple, cup, coffee
I would like to loop through that string and then retrive only the intersected values. so the result would be:
result = car, apple
Can I do this?? Any idea please.