Skip to content

iter::indexOfAny

indexOfAny(items, targets)
indexOfAny(items, targets, startIndex: Integer)

ParameterTypeDescription
itemsIterableThe Iterable to look in
targetsIterableThe values to search for
(optional) startIndexIntegerWhich index to start at

Returns

(Integer) The index of the first item that is equal to one of the given values, or -1 if no match was found.