filters

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterCopy

func FilterCopy[S ~[]T, T any](a S, keepfn func(a T) bool) (out S)

FilterCopy returns a new slice with only the items that pass the filter The original slice is not modified.

For less memory usage, use FilterInPlace

func FilterInPlace

func FilterInPlace[S ~[]T, T any](a S, keepfn func(a T) bool) S

FilterInPlace modifies the slice in place. See Warning.

Warning: All slices that share the same backing array will be modified and need to be replaced by the return value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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