slice

package
v1.100.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MPL-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ZeroedDelete

func ZeroedDelete[S ~[]E, E any](s S, i, j int) S

ZeroedDelete removes the elements s[i:j] from s, returning the modified slice. This function panics if s[i:j] is not a valid slice of s. This function modifies the contents of the slice s; it does not create a new slice. The elements that are removed are zeroed so that any references can be garbage collected. If you do not need this, use slices.Delete instead.

func ZeroedDeleteFunc added in v1.90.0

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

ZeroedDeleteFunc removes any elements from s for which del returns true, returning the modified slice. This function modifies the contents of the slice s; it does not create a new slice. The elements that are removed are zeroed so that any references can be garbage collected. If you do not need this, use slices.DeleteFunc instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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