ZeroInstance
2011-08-30 21:31:42
Okay, so I have this Array of TStringArray, where the values are as follows:
In the examples above, the result would be true since all three of the strings in the second array are in the first values of the tstringarray. It would also be beneficial to be able to determine which index each value is; in this case, it would be 1, 4, 2.
Any ideas? I know I didn't do a good job at explaining, but I hope it makes sense
EDIT:
Another way to explain would be like this; I want to do something like the following:
FirstArray := [['A', '1'], ['B', '2'], ['C', '3'], ['D', '4'], ['E', '5']]And I also have an array with the following values:SecondArray := ['B', 'E', 'C']What I'm attempting to do is to see if all of the strings from the second array are in the first group of indexes of the first array, but in no particular order, and if it is, then perform a task. I can't seem to find a way to program it.In the examples above, the result would be true since all three of the strings in the second array are in the first values of the tstringarray. It would also be beneficial to be able to determine which index each value is; in this case, it would be 1, 4, 2.
Any ideas? I know I didn't do a good job at explaining, but I hope it makes sense
EDIT:
Another way to explain would be like this; I want to do something like the following:
if(ArrayContains(FirstArray, SecondArray) thenWhat would I put in the function ArrayContains?