R H

R H

  • NA
  • 3
  • 784

Multiple strings collectively contain every string in array

Apr 21 2016 4:52 PM

  1.   
I have a unique task that, I hope, has a simple answer...

I need to check whether a collection of separate strings (or text of each item in a listview subitem collection) collectively contain every string in another string array.

For example, I want to supply 1 or more strings in the form of a string array, search a listview, and return any listviewitems that contain all the strings in the first array, even if each string from the array is found in a different subitem. I don't necessarily expect to find one subitem that contains all strings in the array. I'm looking for something more like: subitems[3] contains array[1] and subitems[5] contains array[0], so return the listviewitem
 
Or, I suppose it could be thought of as searching through separate strings (subitems[0].text, subitems[1].text ...) instead of the text of a listview subitem collection. 
 
Any ideas would be appreciated.
Thanks! 
 

Answers (1)