sliceclear

package
v3.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package sliceclear provides a way to clear and truncate the length of a slice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear[Slice ~[]E, E any](s Slice) Slice

Clear zeroes out all values in s and returns s[:0]. Clear allows memory of previous elements in the slice to be reclained by the garbage collector while still allowing the underlying slice memory to be reused.

Types

This section is empty.

Jump to

Keyboard shortcuts

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