Return the prefix of haystack where pred is not satisfied.
1 import std.typecons : No; 2 3 int[] a = [ 1, 2, 4, 7, 7, 2, 4, 7, 3, 5]; 4 assert(a.sliceUntil(7) == [1, 2, 4]); 5 assert(a.sliceUntil!"a == 7" == [1, 2, 4]); 6 assert(a.sliceUntil(7, No.openRight) == [1, 2, 4, 7]);
See Implementation
Return the prefix of haystack where pred is not satisfied.