slice

package
v1.1.0-beta.0...-a86f3dd Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllOf

func AllOf[T any](s []T, p func(int) bool) bool

AllOf returns true if all elements in the slice match the predict func.

func AnyOf

func AnyOf[T any](s []T, p func(int) bool) bool

AnyOf returns true if any element in the slice matches the predict func.

func Contains

func Contains[T comparable](slice []T, value T) bool

Contains returns true if the given slice contains the value.

func NoneOf

func NoneOf[T any](s []T, p func(int) bool) bool

NoneOf returns true if no element in the slice matches the predict func.

func Remove

func Remove[T comparable](slice []T, value T) []T

Remove removes the value from the slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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