slice

package
v2.19.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendUnique added in v2.13.3

func AppendUnique[E comparable](dest []E, src ...E) []E

AppendUnique appends all elements that are not already present in dest to dest and returns the result.

func AsCSV

func AsCSV(vs []string) string

AsCSV returns the string slice encoded by a csv.NewWriter.

func Contains added in v2.13.0

func Contains[E comparable](vs []E, e E) bool

Contains returns true if the given slice contains the given element.

func ContainsAll added in v2.13.0

func ContainsAll[E comparable](vs []E, es []E) bool

ContainsAll returns true if the first slice contains all elements in the second slice.

func ContainsAny added in v2.13.0

func ContainsAny[E comparable](vs []E, es []E) bool

ContainsAny returns true if the first slice contains at least one of the elements in the second slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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