Documentation ¶
Overview ¶
Package intslice provides a few helper functions for dealing with []int.
Index ¶
- func Common(a, b []int) []int
- func Contains(list []int, a int) bool
- func ContainsDuplicates(a []int) bool
- func CreateContinuousIntSlice(start, end int) []int
- func Difference(a, b []int) []int
- func IsContinuous(list []int) bool
- func Max(list []int) int
- func Min(list []int) int
- func NotCommon(a, b []int) []int
- func RemoveDuplicates(options *[]int, otherStringsToClean ...int)
- func RemoveDuplicates64(options *[]int64, otherStringsToClean ...int64)
- func Sum(list []int) int
- func ToStringSlice(in []int) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsDuplicates ¶ added in v0.42.0
func CreateContinuousIntSlice ¶ added in v0.42.0
func Difference ¶ added in v0.39.0
func IsContinuous ¶ added in v0.42.0
IsContinuous checks if an int slice contains a continuous list of incremental integers
func RemoveDuplicates ¶ added in v0.39.2
RemoveDuplicates in []int.
func RemoveDuplicates64 ¶ added in v0.42.0
RemoveDuplicates64 in []int64.
func ToStringSlice ¶
ToStringSlice transforms an []int to a []string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.