overlap

fnCommonType!(T[], U[]) overlap(T, U)(T[] a, U[] b) if (is(typeof(a.ptr < b.ptr) == bool)) @trusted

Returns the overlapping portion, if any, of two arrays. Unlike equal, overlap only compares the pointers and lengths in the ranges, not the values referred by them. If r1 and r2 have an overlapping slice, returns that slice. Otherwise, returns the null slice.

Parameters

aThe first array to compare
bThe second array to compare

Returns

The overlapping portion of the two arrays.