slices

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LastIndex

func LastIndex[S ~[]E, E comparable](s S, el E) int

Finds the index of the last occurrence of the search value in the slice. Comparison is done with the `==` operator. Returns -1 if the element is not found.

func LastIndexFunc

func LastIndexFunc[S ~[]E, E any](s S, fn func(E) bool) int

Finds the index of the last element, that satisfies fn(s[i]). Returns -1 if no elements satisfy the callback.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL