Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](s []T, els ...T) bool
Contains returns true if elements is present in a collection.
func Difference ¶ added in v2.1.28
func Difference[T comparable](l1 []T, l2 []T) ([]T, []T)
Difference returns the difference between two slices. The first value is the collection of element absent of l2. The second value is the collection of element absent of l1.
func FindDuplicate ¶
func FindDuplicate[T comparable](s []T) (T, bool)
FindDuplicate returns duplicate element in a collection.
func Remove ¶ added in v2.0.30
func Remove[T comparable](s []T, i int) []T
Remove removes an element from a collection.
func RemoveDuplicates ¶ added in v2.0.6
func RemoveDuplicates[T comparable](s []T) []T
RemoveDuplicates removes duplicate element in a collection.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.