slicez

package
v0.0.66 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

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

func Copy

func Copy[T any](src []T) (dst []T)

func CutOff

func CutOff[T any](source []T, length int) []T

func DeepContains

func DeepContains[T any](s []T, value T) bool

func DeepExclude

func DeepExclude[T any](s []T, exclude T) (excluded []T)

func Each

func Each[T any](s []T, f func(index int, elem T))

func Equal

func Equal[T comparable](sliceA, sliceB []T) bool

func Exclude

func Exclude[T comparable](s []T, excludes []T) (excluded []T)

func Filter

func Filter[T any](s []T, filter func(index int, elem T) bool) []T

func First

func First[T any](s []T) T

func Last

func Last[T any](s []T) T

func Reverse

func Reverse[T any](source []T) []T

func Select

func Select[Source, Selected any](s []Source, generator func(index int, source Source) (selected Selected)) []Selected

func Sort

func Sort[T any](source []T, less func(elemA, elemB T) bool) []T

func Split

func Split[T any](source []T, size int) [][]T

func ToMap

func ToMap[Key comparable, Value any](s []Value, getKey func(index int, value Value) (key Key)) map[Key]Value

func Uniq

func Uniq[T comparable](source []T) []T

Types

This section is empty.

Jump to

Keyboard shortcuts

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