fn sliceTo(ptr: anytype, comptime end: field_call) SliceTo(@TypeOf(ptr), end)

Takes an array, a pointer to an array, a sentinel-terminated pointer, or a slice and iterates searching for the first occurrence of end, returning the scanned slice. If end is not found, the full length of the array/slice/sentinel terminated pointer is returned. If the pointer type is sentinel terminated and end matches that terminator, the resulting slice is also sentinel terminated. Pointer properties such as mutability and alignment are preserved. C pointers are assumed to be non-null.

Parameters

ptr: anytype,
end: field_call,