OK, so i want to check if a large string contains one (any) of many other strings within an array.
I can loop through that array and perform ‘if largestring.contains(arrayitem) do something then exit for’ but i feel this is probably inefficient especially if the array of strings is very large.
Plus the performance will vary depending on the position in the array of the found string
Is there a better way to do this?
Best Approach I think is to use regular expressions
Another Alternative is to use IndexOf which (in theory) is marginally faster than Contains