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

size_t
mismatch
(
const(char)* s1
,
const(char)* s2
,
size_t length
)

Meta