Documentation ¶
Index ¶
- Variables
- func As(slice []interface{}) (res []int32, err error)
- func Contains(haystack []int32, needle int32) bool
- func ContainsAll(haystack []int32, needles ...int32) bool
- func ContainsAny(haystack []int32, needles ...int32) bool
- func Cut(slice []int32, separator int32) (left, right []int32, found bool)
- func CutAny(val []int32, seperators ...int32) (left, right []int32, found bool)
- func CutAt(val []int32, index int) (left, right []int32)
- func Equal(a []int32, b []int32) bool
- func Fill(slice []int32, val int32) []int32
- func Index(haystack []int32, needle int32) int
- func Interface(slice []int32) (res []interface{}, err error)
- func Remove(slice []int32, offset int, values ...int32) (res []int32)
- func RemoveAt(slice []int32, index int) (res []int32)
- func Resize(s []int32, n int) (res []int32)
- func Sort(s []int32)
- func SortReverse(s []int32)
- func Split(slice []int32, separator int32) (parts [][]int32)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInterfaceNotInt32 = errors.New("encountered non-int32 interface")
)
Functions ¶
func ContainsAll ¶
Check if a []int32 slice contains ALL of the provided members
func ContainsAny ¶
Check if a []int32 slice contains ANY of the provided members
func Index ¶
Find the index where the needle appears. Returns -1 if the needle doesn't appear in the slice.
func Remove ¶ added in v0.5.10
Remove the first occurrence of each value from the slice starting from the supplied offset
func RemoveAt ¶ added in v0.5.10
Remove the item at the index while preserving the order of the items TODO: maybe change this to take multiple indices and to remove them at the same time
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.