Files
lo/docs/data/core-findlastindexof.md
T
Samuel Berthe fa095e4b4f fix(doc): fix go playground demo URL (#832)
* fix(doc): fix go playground demo URL

* fix(doc): add more go playground demo URL
2026-03-06 00:09:59 +01:00

688 B

name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
name slug sourceRef category subCategory playUrl variantHelpers similarHelpers position signatures
FindLastIndexOf findlastindexof find.go#L101 core find https://go.dev/play/p/2VhPMiQvX-D
core#find#findlastindexof
core#find#findindexof
core#find#find
core#find#lastindexof
core#find#findby
60
func FindLastIndexOf[T any](collection []T, predicate func(item T) bool) (T, int, bool)

Searches for the last element matching the predicate and returns the element, its index, and a boolean indicating success.

val, idx, ok := lo.FindLastIndexOf([]string{"a", "b", "a", "b"}, func(i string) bool {
    return i == "b"
})
// "b", 3, true