countMatch

private fnsize_t countMatch(const(ubyte)[] src, size_t pos1, size_t pos2, size_t maxLen)

Count the number of matching bytes starting at two positions.

Parameters

srcThe input buffer to search within.
pos1First position to compare from.
pos2Second position to compare from.
maxLenMaximum number of bytes to compare.

Returns

The number of consecutive matching bytes.