Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶ added in v0.0.17
func Contains[T comparable](s []T, v T) bool
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
func Subtract ¶ added in v0.0.17
func Subtract[T comparable](a, b []T) []T
Subtract returns a slice containing all elements of a that are not in b.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.