slicehelper

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CutUsed

func CutUsed[T any](x []T) (used, unused []T)

CutUsed cuts x at len(x).

When cap(x) is not 0, it returns x[:len(x):len(x)] as used and x[len(x):len(x):cap(x)] as unused.

When cap(x) is 0, it returns x and nil as used and unused.

func New

func New[T any](base []T, add ...T) []T

Types

This section is empty.

Jump to

Keyboard shortcuts

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