fn lastIndexOf(comptime T: type, haystack: []const T, needle: []const T) ?usize

Find the index in a slice of a sub-slice, searching from the end backwards. To start looking at a different index, slice the haystack first. Uses the Reverse Boyer-Moore-Horspool algorithm on large inputs; lastIndexOfLinear on small inputs.

Parameters

T: type,
haystack: []const T,
needle: []const T,