slices

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cut

func Cut[T comparable](i, j int, a ...T) []T

Cut removes an element from a slice at a given position.

func Delete

func Delete[T comparable](i int, a ...T) []T

Delete removes an element from a slice by value.

func Insert

func Insert[T comparable](x T, idx int, a ...T) []T

Insert adds an element at a given position in a slice.

func Pop

func Pop[T comparable](a ...T) (T, []T)

Pop removes an element from the end of a slice.

func Push

func Push[T comparable](x T, a ...T) []T

Push adds an element to the end of a slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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