skipOverBack

  1. bool skipOverBack(Haystack haystack, Needle needle)
  2. bool skipOverBack(Haystack haystack, Needle needle)
    bool
    skipOverBack
    (
    alias pred
    Haystack
    Needle
    )
    (
    scope ref Haystack haystack
    ,
    scope Needle needle
    )
    if (
    isBidirectionalRange!Haystack &&
    isBidirectionalRange!Needle
    &&
    is(typeof(binaryFun!pred(haystack.back, needle.back)))
    )

Examples

auto s1_ = [1, 2, 3].s;
auto s1 = s1_[];
const s2_ = [2, 3].s;
const s2 = s2_[];
s1.skipOverBack(s2);
assert(s1 == [1].s);
s1.skipOverBack(s2);        // no effect
assert(s1 == [1].s);

Meta