mismatch

Returns the index of a mismatch between s1 & s2, failing when length is reached. Note that we return 'length' upon failure (array content matches) and a 0-based index upon success.

Use this as a faster opEquals. Also provides the basis for a faster opCmp, since the index of the first mismatched character can be used to determine the return value

mismatch
(
T
)
(
const(T)* s1
,
const(T)* s2
,)

Meta