The array to search.
The needletern to search for, either sub-array or element
The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type.
The index of the first match or haystack.length if no match was found.
test!("==")(find( "abc", "bc" ), 1); test!("==")(find( "abcd", "cc" ), 4);
test!("==")(find( "abc", 'b' ), 1);
auto buffer = createBuffer([ 1, 2, 3 ]); test!("==")(find(buffer, [ 2, 3 ]), 1);
auto buffer = createBuffer([ 1, 2, 3 ]); test!("==")(find(buffer, 3), 2);
Linear search in an array
Performs a linear scan of haystack from [0 .. haystack.length$(RP), returning the index of the first element matching needle, or haystack.length if no match was found. Comparisons will be performed using the supplied predicate or '==' if none is supplied.