Check if give an array is equal to first elements in another array

thedeemon via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Oct 15 23:13:51 PDT 2014


On Thursday, 16 October 2014 at 04:35:13 UTC, MachineCode wrote:
> Is there one function in the Phobos library to check if give an 
> array is equal to first elements in another array?

auto n = min(a.length, b.length);
if (a[0..n] == b[0..n]) ...


More information about the Digitalmars-d-learn mailing list