mismatch

Performs a parallel linear scan of bufA and bufB from [0 .. N$(RP) where N = min(bufA.length, bufB.length), returning the index of the first element in bufA which does not match the corresponding element in bufB or N if no mismatch occurs. Comparisons will be performed using the supplied predicate or '==' if none is supplied.

  1. size_t mismatch(Elem[] bufA, Elem[] bufB, Pred2E pred)
    version(TangoDoc)
    mismatch
  2. template mismatch(BufA, BufB)
  3. template mismatch(BufA, BufB, Pred)

Parameters

bufA Elem[]

The array to evaluate.

bufB Elem[]

The array to match against.

pred Pred2E

The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type.

Return Value

Type: size_t

The index of the first mismatch or N if the first N elements of bufA and bufB match, where N = min$(LP)bufA.length, bufB.length$(RP).

Meta