slices

package
v1.12.19 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package slices contains common utilities to work on slices of any type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFunc added in v1.12.18

func DeleteFunc[S ~[]E, E any](s S, del func(E) bool) S

DeleteFunc removes any elements from s for which del returns true, returning the modified slice. When DeleteFunc removes m elements, it might not modify the elements s[len(s)-m:len(s)]. If those elements contain pointers you might consider zeroing those elements so that objects they reference can be garbage collected.

Types

This section is empty.

Jump to

Keyboard shortcuts

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