[ Version ( since = "2.54" ) ]
public bool find (G needle, out uint index = null)
Checks whether needle
exists in haystack
.
If the element is found, true is returned and the element’s index is returned in index_
(if non-null). Otherwise, false is returned and index_
is undefined. If needle
exists multiple times in haystack
, the index of the first instance is returned.
This does pointer comparisons only. If you want to use more complex equality checks, such as string comparisons, use find_with_equal_func.
needle |
pointer to look for |
haystack |
pointer array to be searched |
index_ |
return location for the index of the element, if found |
true if |