Function lastIndexOfAny [src]

Prototype

pub fn lastIndexOfAny(comptime T: type, slice: []const T, values: []const T) ?usize

Parameters

T: typeslice: []const Tvalues: []const T

Source

pub fn lastIndexOfAny(comptime T: type, slice: []const T, values: []const T) ?usize { var i: usize = slice.len; while (i != 0) { i -= 1; for (values) |value| { if (slice[i] == value) return i; } } return null; }