indexOf

Array-specialization of indexOf with default predicate.

TODO: Add optimized implementation for needles with length >= largeNeedleLength with no repeat of elements.

  1. ptrdiff_t indexOf(inout(T)[] haystack, const(T)[] needle)
    @trusted
    ptrdiff_t
    indexOf
    (
    T
    )
    (
    scope inout(T)[] haystack
    ,
    scope const(T)[] needle
    )
  2. ptrdiff_t indexOf(inout(T)[] haystack, T needle)

Meta