I want to search an array to see if it contains a specific string, and then get the index of the result.
For example, if I had:
array[0] = "dogs";
array[1] = "cats";
array[2] = "oranges";
I want to be able to search for “oran” and get 2 back. Any idea on how to do this?
You can do something like this:
Then whenever you want to find something call it like:
To search for a part of the word can pontentially return undesiderd results for bigger lists, but you can do it with the following: