sliceutil

package
v0.0.0-...-d04bc5a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsAll

func ContainsAll[S ~[]E, E comparable](super S, sub S) bool

Contains reports whether all elements in sub are present in super.

func Equal

func Equal[S ~[]E, E constraints.Ordered](left S, right S) bool

func InplaceTake

func InplaceTake[T any](slice []T, predicate []bool) []T

please ensure len(slice) <= len(predicate) before calling this function.

func SliceDeDup

func SliceDeDup[S ~[]E, E constraints.Ordered](s S) S

func SortMapKeyForDeterminism

func SortMapKeyForDeterminism[k constraints.Ordered, v any](m map[k]v) []k

func Subtraction

func Subtraction[S ~[]E, E comparable](a S, b S) S

func Take

func Take[T any](slice []T, predicate []bool) []T

please ensure len(slice) <= len(predicate) before calling this function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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