Documentation
¶
Index ¶
- func Contains[T any](elems []T, v T) bool
- func ContainsString(slice []string, s string) bool
- func Deduplicate[T any](elems []T) []T
- func Find[T any](input []T, finder func(T, int) bool) *T
- func ForEach[T any](elems []T, fn func(T))
- func IndexOf[T any](elems []T, v T) int
- func Intersects[T comparable](s1 []T, s2 []T) bool
- func IsEquivalent(a *[]string, b *[]string) bool
- func Map[T any, R any](elems []T, fn func(T) R) []R
- func Remove[T comparable](elems []T, v T) []T
- func RemoveString(slice []string, s string) (result []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
ContainsString tests if list of strings contains one specific string `s`
func Deduplicate ¶
func Deduplicate[T any](elems []T) []T
func Intersects ¶
func Intersects[T comparable](s1 []T, s2 []T) bool
Intersects returns true if two slices have at least 1 common element
func IsEquivalent ¶
IsEquivalent returns true if two string slices contain the same items agnostic to item order
func Remove ¶
func Remove[T comparable](elems []T, v T) []T
Remove removes an element of a generic slice
func RemoveString ¶
RemoveString from slice
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.