Documentation ¶
Overview ¶
Package slice contains utility functions to manage slices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LongestString ¶ added in v0.8.2
LongestString returns the longest string in a slice of strings.
func Merge ¶ added in v0.10.2
func Merge[K comparable](s1, s2 []K) []K
Merge merges two slices removing duplicates.
func Remove ¶ added in v0.10.2
func Remove[K comparable](slice []K, s K) []K
Remove returns a newly created slice that contains all items from slice that are not equal to s.
func Sub ¶ added in v0.10.2
func Sub[K comparable](s1, s2 []K) []K
Sub removes elements of s2 from s1.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.