slices

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 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 any](array []T, cmp func(v T) bool) bool

func ContainsItem

func ContainsItem[T comparable](slice []T, item T) bool

func ConvertSlice

func ConvertSlice[To, From any](slice []From, convert func(From) To) []To

func ConvertToSlice

func ConvertToSlice[To, From any](convert func(From) To, objs ...From) []To

func Filter

func Filter[T any](array []T, filterFunc func(T) bool) []T

func FilterOut

func FilterOut[T any](array []T, filterOutFunc func(T) bool) []T

func FilterOutNil

func FilterOutNil[T any](array []*T) []*T

func Find

func Find[T any](slice []T, filterFunc func(T) bool) (T, int, bool)

func FindItem

func FindItem[T comparable](slice []T, item T) (T, int, bool)

func Flatten

func Flatten[T any](xs [][]T) []T

func IdentityFunc

func IdentityFunc[T comparable](item T) func(T) bool

func ToSlice

func ToSlice[T any](objs ...T) []T

func ToString

func ToString[T ~string](v T) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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