sliceutils

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteElement

func DeleteElement[T comparable](slice []T, element T) []T

DeleteElement deletes the first element in the slice that equals the given value.

func Replace added in v0.0.6

func Replace[T comparable](slice []T, oldVal T, newVal T) int

Replace replaces every instance of oldVal with newVal in the given slice. It returns true if

Types

This section is empty.

Jump to

Keyboard shortcuts

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