slices

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func In

func In[T comparable](s []T, e T) bool

In returns true if an element is in a slice. Otherwise, it returns false.

func Occurrences

func Occurrences[T comparable](s []T, e T) int

Occurrences returns the number of times an element appears in a slice.

func ValForKey

func ValForKey[T comparable](s []T, e T) (T, bool)

ValForKey returns the value for a key in a slice. It assumes that the slice is a key-value pair.

Types

This section is empty.

Jump to

Keyboard shortcuts

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