Quantcast
Channel: Siemens Latest Topics
Viewing all articles
Browse latest Browse all 698

Getting Index of particular array element

$
0
0

Say I have an array of strings and a string I want to find in said array.  Is there a way to return the index of the string that matches the string I am searching for?

Array = [DOG],[CAT],[MOUSE],[HORSE],[WOMBAT]

Search string = MOUSE

Find "MOUSE" in Array = 2


Viewing all articles
Browse latest Browse all 698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>