Documentation ¶
Index ¶
- Variables
- func As(slice []interface{}) (res []int16, err error)
- func Contains(haystack []int16, needle int16) bool
- func ContainsAll(haystack []int16, needles ...int16) bool
- func ContainsAny(haystack []int16, needles ...int16) bool
- func Cut(slice []int16, separator int16) (left, right []int16, found bool)
- func CutAny(val []int16, seperators ...int16) (left, right []int16, found bool)
- func CutAt(val []int16, index int) (left, right []int16)
- func Equal(a []int16, b []int16) bool
- func Fill(slice []int16, val int16) []int16
- func Index(haystack []int16, needle int16) int
- func Interface(slice []int16) (res []interface{}, err error)
- func Remove(slice []int16, offset int, values ...int16) (res []int16)
- func RemoveAt(slice []int16, index int) (res []int16)
- func Resize(s []int16, n int) (res []int16)
- func Sort(s []int16)
- func SortReverse(s []int16)
- func Split(slice []int16, separator int16) (parts [][]int16)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInterfaceNotInt16 = errors.New("encountered non-int16 interface")
)
Functions ¶
func ContainsAll ¶
Check if a []int16 slice contains ALL of the provided members
func ContainsAny ¶
Check if a []int16 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.