slices

package
v2.1.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

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

Contains returns true if an element is present in a collection.

func FindDuplicate

func FindDuplicate[T comparable](s []T) (T, bool)

FindDuplicate returns duplicate element in a collection.

func Remove added in v2.0.30

func Remove[T comparable](s []T, i int) []T

Remove removes an element from a collection.

func RemoveDuplicates added in v2.0.6

func RemoveDuplicates[T comparable](s []T) []T

RemoveDuplicates removes duplicate element in a collection.

func Reverse added in v2.0.30

func Reverse[S ~[]T, T any](s S)

Reverse reverses elements in a collection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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