I want find a string array in other string array. How I do that?
Example:
string[] a = {"a","b","c","d","e","f","g","c","d","e"}
string[] b = {"d","e"}
How find b
in a
, I need get the index of all instances.
I want find a string array in other string array. How I do that?
Example:
string[] a = {"a","b","c","d","e","f","g","c","d","e"}
string[] b = {"d","e"}
How find b
in a
, I need get the index of all instances.
I would suggest you search a bit of the documentation to understand more of the language but anyway I'll try to explain what you can do
You can do a for loop going through the a array and inside you do a for loop going through the b array, if a[index] = b[index2] you break out of the a loop and put the index in a new array that you initialized before
If you need more help than that say but I recommend going through more documentation and a few videos and learn a bit more the basics