Correction: This is what I think you mean:

bool sliceOf(T)(in T[] part,
               in T[] whole)
{
   return (whole.ptr <= part.ptr &&
           part.ptr + part.length <=
           whole.ptr + whole.length);
}

Yes, of course. I had lhs, rhs and messed up the renaming of those.

https://github.com/dcarp/phobos/compare/sliceOf

Reply via email to