slice

package
v0.0.0-...-f83813f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendIfUniqueStrings

func AppendIfUniqueStrings(slice []string, elem string) []string

func Cast

func Cast[A any, B any](as []A) []B

func ContainsString

func ContainsString(in []string, elem string) bool

ContainsString determine whether the input slice contains the specified string.

func Deduplicate

func Deduplicate[T comparable](slice []T) []T

func ExceptStrings

func ExceptStrings(slice []string, except []string) []string

ExceptStrings return a new slice that without the element appears in the second slice.

func Filter

func Filter[A any](as []A, pred func(A) bool) []A

func FlatMap

func FlatMap[A any, B any](as []A, mapper func(A) []B) []B

func Map

func Map[A any, B any](as []A, mapper func(A) B) []B

func ToStringSlice

func ToStringSlice(slice [][]byte) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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