sliceutils

package
v0.2.2-0...-0a6dbcb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolClone

func BoolClone(in []bool) []bool

BoolClone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func BoolDiff

func BoolDiff(a, b []bool, lessFunc func(a, b bool) bool) (aOnly, bOnly []bool)

BoolDiff returns, given two sorted bool slices a and b, a slice of the elements occurring in a and b only, respectively.

func BoolDifference

func BoolDifference(slice1, slice2 []bool) []bool

BoolDifference returns the array of elements in the first slice that aren't in the second slice

func BoolFind

func BoolFind(slice []bool, elem bool) int

BoolFind returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func BoolUnion

func BoolUnion(slice1, slice2 []bool) []bool

BoolUnion returns the union array of slice1 and slice2 without duplicates

func BoolUnique

func BoolUnique(slice []bool) []bool

BoolUnique returns a new slice that contains only the first occurrence of each element in slice.

func ByteClone

func ByteClone(in []byte) []byte

ByteClone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func ByteDiff

func ByteDiff(a, b []byte, lessFunc func(a, b byte) bool) (aOnly, bOnly []byte)

ByteDiff returns, given two sorted byte slices a and b, a slice of the elements occurring in a and b only, respectively.

func ByteDifference

func ByteDifference(slice1, slice2 []byte) []byte

ByteDifference returns the array of elements in the first slice that aren't in the second slice

func ByteFind

func ByteFind(slice []byte, elem byte) int

ByteFind returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func ByteUnion

func ByteUnion(slice1, slice2 []byte) []byte

ByteUnion returns the union array of slice1 and slice2 without duplicates

func ByteUnique

func ByteUnique(slice []byte) []byte

ByteUnique returns a new slice that contains only the first occurrence of each element in slice.

func Complex128Clone

func Complex128Clone(in []complex128) []complex128

Complex128Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Complex128Diff

func Complex128Diff(a, b []complex128, lessFunc func(a, b complex128) bool) (aOnly, bOnly []complex128)

Complex128Diff returns, given two sorted complex128 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Complex128Difference

func Complex128Difference(slice1, slice2 []complex128) []complex128

Complex128Difference returns the array of elements in the first slice that aren't in the second slice

func Complex128Find

func Complex128Find(slice []complex128, elem complex128) int

Complex128Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Complex128Union

func Complex128Union(slice1, slice2 []complex128) []complex128

Complex128Union returns the union array of slice1 and slice2 without duplicates

func Complex128Unique

func Complex128Unique(slice []complex128) []complex128

Complex128Unique returns a new slice that contains only the first occurrence of each element in slice.

func Complex64Clone

func Complex64Clone(in []complex64) []complex64

Complex64Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Complex64Diff

func Complex64Diff(a, b []complex64, lessFunc func(a, b complex64) bool) (aOnly, bOnly []complex64)

Complex64Diff returns, given two sorted complex64 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Complex64Difference

func Complex64Difference(slice1, slice2 []complex64) []complex64

Complex64Difference returns the array of elements in the first slice that aren't in the second slice

func Complex64Find

func Complex64Find(slice []complex64, elem complex64) int

Complex64Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Complex64Union

func Complex64Union(slice1, slice2 []complex64) []complex64

Complex64Union returns the union array of slice1 and slice2 without duplicates

func Complex64Unique

func Complex64Unique(slice []complex64) []complex64

Complex64Unique returns a new slice that contains only the first occurrence of each element in slice.

func ConcatBoolSlices

func ConcatBoolSlices(slices ...[]bool) []bool

ConcatBoolSlices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatByteSlices

func ConcatByteSlices(slices ...[]byte) []byte

ConcatByteSlices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatComplex128Slices

func ConcatComplex128Slices(slices ...[]complex128) []complex128

ConcatComplex128Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatComplex64Slices

func ConcatComplex64Slices(slices ...[]complex64) []complex64

ConcatComplex64Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatErrorSlices

func ConcatErrorSlices(slices ...[]error) []error

ConcatErrorSlices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatFloat32Slices

func ConcatFloat32Slices(slices ...[]float32) []float32

ConcatFloat32Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatFloat64Slices

func ConcatFloat64Slices(slices ...[]float64) []float64

ConcatFloat64Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatInt16Slices

func ConcatInt16Slices(slices ...[]int16) []int16

ConcatInt16Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatInt32Slices

func ConcatInt32Slices(slices ...[]int32) []int32

ConcatInt32Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatInt64Slices

func ConcatInt64Slices(slices ...[]int64) []int64

ConcatInt64Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatInt8Slices

func ConcatInt8Slices(slices ...[]int8) []int8

ConcatInt8Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatIntSlices

func ConcatIntSlices(slices ...[]int) []int

ConcatIntSlices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatRuneSlices

func ConcatRuneSlices(slices ...[]rune) []rune

ConcatRuneSlices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatStringSlices

func ConcatStringSlices(slices ...[]string) []string

ConcatStringSlices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatUint16Slices

func ConcatUint16Slices(slices ...[]uint16) []uint16

ConcatUint16Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatUint32Slices

func ConcatUint32Slices(slices ...[]uint32) []uint32

ConcatUint32Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatUint64Slices

func ConcatUint64Slices(slices ...[]uint64) []uint64

ConcatUint64Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatUint8Slices

func ConcatUint8Slices(slices ...[]uint8) []uint8

ConcatUint8Slices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatUintSlices

func ConcatUintSlices(slices ...[]uint) []uint

ConcatUintSlices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ConcatUintptrSlices

func ConcatUintptrSlices(slices ...[]uintptr) []uintptr

ConcatUintptrSlices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ElemTypeFind

func ElemTypeFind(slice []ElemType, elem ElemType) int

ElemTypeFind returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func ErrorClone

func ErrorClone(in []error) []error

ErrorClone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func ErrorDiff

func ErrorDiff(a, b []error, lessFunc func(a, b error) bool) (aOnly, bOnly []error)

ErrorDiff returns, given two sorted error slices a and b, a slice of the elements occurring in a and b only, respectively.

func ErrorDifference

func ErrorDifference(slice1, slice2 []error) []error

ErrorDifference returns the array of elements in the first slice that aren't in the second slice

func ErrorFind

func ErrorFind(slice []error, elem error) int

ErrorFind returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func ErrorUnion

func ErrorUnion(slice1, slice2 []error) []error

ErrorUnion returns the union array of slice1 and slice2 without duplicates

func ErrorUnique

func ErrorUnique(slice []error) []error

ErrorUnique returns a new slice that contains only the first occurrence of each element in slice.

func Float32Clone

func Float32Clone(in []float32) []float32

Float32Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Float32Diff

func Float32Diff(a, b []float32, lessFunc func(a, b float32) bool) (aOnly, bOnly []float32)

Float32Diff returns, given two sorted float32 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Float32Difference

func Float32Difference(slice1, slice2 []float32) []float32

Float32Difference returns the array of elements in the first slice that aren't in the second slice

func Float32Find

func Float32Find(slice []float32, elem float32) int

Float32Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Float32Union

func Float32Union(slice1, slice2 []float32) []float32

Float32Union returns the union array of slice1 and slice2 without duplicates

func Float32Unique

func Float32Unique(slice []float32) []float32

Float32Unique returns a new slice that contains only the first occurrence of each element in slice.

func Float64Clone

func Float64Clone(in []float64) []float64

Float64Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Float64Diff

func Float64Diff(a, b []float64, lessFunc func(a, b float64) bool) (aOnly, bOnly []float64)

Float64Diff returns, given two sorted float64 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Float64Difference

func Float64Difference(slice1, slice2 []float64) []float64

Float64Difference returns the array of elements in the first slice that aren't in the second slice

func Float64Find

func Float64Find(slice []float64, elem float64) int

Float64Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Float64Union

func Float64Union(slice1, slice2 []float64) []float64

Float64Union returns the union array of slice1 and slice2 without duplicates

func Float64Unique

func Float64Unique(slice []float64) []float64

Float64Unique returns a new slice that contains only the first occurrence of each element in slice.

func Int16Clone

func Int16Clone(in []int16) []int16

Int16Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Int16Diff

func Int16Diff(a, b []int16, lessFunc func(a, b int16) bool) (aOnly, bOnly []int16)

Int16Diff returns, given two sorted int16 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Int16Difference

func Int16Difference(slice1, slice2 []int16) []int16

Int16Difference returns the array of elements in the first slice that aren't in the second slice

func Int16Find

func Int16Find(slice []int16, elem int16) int

Int16Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Int16Union

func Int16Union(slice1, slice2 []int16) []int16

Int16Union returns the union array of slice1 and slice2 without duplicates

func Int16Unique

func Int16Unique(slice []int16) []int16

Int16Unique returns a new slice that contains only the first occurrence of each element in slice.

func Int32Clone

func Int32Clone(in []int32) []int32

Int32Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Int32Diff

func Int32Diff(a, b []int32, lessFunc func(a, b int32) bool) (aOnly, bOnly []int32)

Int32Diff returns, given two sorted int32 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Int32Difference

func Int32Difference(slice1, slice2 []int32) []int32

Int32Difference returns the array of elements in the first slice that aren't in the second slice

func Int32Find

func Int32Find(slice []int32, elem int32) int

Int32Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Int32Union

func Int32Union(slice1, slice2 []int32) []int32

Int32Union returns the union array of slice1 and slice2 without duplicates

func Int32Unique

func Int32Unique(slice []int32) []int32

Int32Unique returns a new slice that contains only the first occurrence of each element in slice.

func Int64Clone

func Int64Clone(in []int64) []int64

Int64Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Int64Diff

func Int64Diff(a, b []int64, lessFunc func(a, b int64) bool) (aOnly, bOnly []int64)

Int64Diff returns, given two sorted int64 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Int64Difference

func Int64Difference(slice1, slice2 []int64) []int64

Int64Difference returns the array of elements in the first slice that aren't in the second slice

func Int64Find

func Int64Find(slice []int64, elem int64) int

Int64Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Int64Union

func Int64Union(slice1, slice2 []int64) []int64

Int64Union returns the union array of slice1 and slice2 without duplicates

func Int64Unique

func Int64Unique(slice []int64) []int64

Int64Unique returns a new slice that contains only the first occurrence of each element in slice.

func Int8Clone

func Int8Clone(in []int8) []int8

Int8Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Int8Diff

func Int8Diff(a, b []int8, lessFunc func(a, b int8) bool) (aOnly, bOnly []int8)

Int8Diff returns, given two sorted int8 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Int8Difference

func Int8Difference(slice1, slice2 []int8) []int8

Int8Difference returns the array of elements in the first slice that aren't in the second slice

func Int8Find

func Int8Find(slice []int8, elem int8) int

Int8Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Int8Union

func Int8Union(slice1, slice2 []int8) []int8

Int8Union returns the union array of slice1 and slice2 without duplicates

func Int8Unique

func Int8Unique(slice []int8) []int8

Int8Unique returns a new slice that contains only the first occurrence of each element in slice.

func IntClone

func IntClone(in []int) []int

IntClone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func IntDiff

func IntDiff(a, b []int, lessFunc func(a, b int) bool) (aOnly, bOnly []int)

IntDiff returns, given two sorted int slices a and b, a slice of the elements occurring in a and b only, respectively.

func IntDifference

func IntDifference(slice1, slice2 []int) []int

IntDifference returns the array of elements in the first slice that aren't in the second slice

func IntFind

func IntFind(slice []int, elem int) int

IntFind returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func IntUnion

func IntUnion(slice1, slice2 []int) []int

IntUnion returns the union array of slice1 and slice2 without duplicates

func IntUnique

func IntUnique(slice []int) []int

IntUnique returns a new slice that contains only the first occurrence of each element in slice.

func RuneClone

func RuneClone(in []rune) []rune

RuneClone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func RuneDiff

func RuneDiff(a, b []rune, lessFunc func(a, b rune) bool) (aOnly, bOnly []rune)

RuneDiff returns, given two sorted rune slices a and b, a slice of the elements occurring in a and b only, respectively.

func RuneDifference

func RuneDifference(slice1, slice2 []rune) []rune

RuneDifference returns the array of elements in the first slice that aren't in the second slice

func RuneFind

func RuneFind(slice []rune, elem rune) int

RuneFind returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func RuneUnion

func RuneUnion(slice1, slice2 []rune) []rune

RuneUnion returns the union array of slice1 and slice2 without duplicates

func RuneUnique

func RuneUnique(slice []rune) []rune

RuneUnique returns a new slice that contains only the first occurrence of each element in slice.

func StringClone

func StringClone(in []string) []string

StringClone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func StringDiff

func StringDiff(a, b []string, lessFunc func(a, b string) bool) (aOnly, bOnly []string)

StringDiff returns, given two sorted string slices a and b, a slice of the elements occurring in a and b only, respectively.

func StringDifference

func StringDifference(slice1, slice2 []string) []string

StringDifference returns the array of elements in the first slice that aren't in the second slice

func StringFind

func StringFind(slice []string, elem string) int

StringFind returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func StringUnion

func StringUnion(slice1, slice2 []string) []string

StringUnion returns the union array of slice1 and slice2 without duplicates

func StringUnique

func StringUnique(slice []string) []string

StringUnique returns a new slice that contains only the first occurrence of each element in slice.

func Uint16Clone

func Uint16Clone(in []uint16) []uint16

Uint16Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Uint16Diff

func Uint16Diff(a, b []uint16, lessFunc func(a, b uint16) bool) (aOnly, bOnly []uint16)

Uint16Diff returns, given two sorted uint16 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Uint16Difference

func Uint16Difference(slice1, slice2 []uint16) []uint16

Uint16Difference returns the array of elements in the first slice that aren't in the second slice

func Uint16Find

func Uint16Find(slice []uint16, elem uint16) int

Uint16Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Uint16Union

func Uint16Union(slice1, slice2 []uint16) []uint16

Uint16Union returns the union array of slice1 and slice2 without duplicates

func Uint16Unique

func Uint16Unique(slice []uint16) []uint16

Uint16Unique returns a new slice that contains only the first occurrence of each element in slice.

func Uint32Clone

func Uint32Clone(in []uint32) []uint32

Uint32Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Uint32Diff

func Uint32Diff(a, b []uint32, lessFunc func(a, b uint32) bool) (aOnly, bOnly []uint32)

Uint32Diff returns, given two sorted uint32 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Uint32Difference

func Uint32Difference(slice1, slice2 []uint32) []uint32

Uint32Difference returns the array of elements in the first slice that aren't in the second slice

func Uint32Find

func Uint32Find(slice []uint32, elem uint32) int

Uint32Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Uint32Union

func Uint32Union(slice1, slice2 []uint32) []uint32

Uint32Union returns the union array of slice1 and slice2 without duplicates

func Uint32Unique

func Uint32Unique(slice []uint32) []uint32

Uint32Unique returns a new slice that contains only the first occurrence of each element in slice.

func Uint64Clone

func Uint64Clone(in []uint64) []uint64

Uint64Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Uint64Diff

func Uint64Diff(a, b []uint64, lessFunc func(a, b uint64) bool) (aOnly, bOnly []uint64)

Uint64Diff returns, given two sorted uint64 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Uint64Difference

func Uint64Difference(slice1, slice2 []uint64) []uint64

Uint64Difference returns the array of elements in the first slice that aren't in the second slice

func Uint64Find

func Uint64Find(slice []uint64, elem uint64) int

Uint64Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Uint64Union

func Uint64Union(slice1, slice2 []uint64) []uint64

Uint64Union returns the union array of slice1 and slice2 without duplicates

func Uint64Unique

func Uint64Unique(slice []uint64) []uint64

Uint64Unique returns a new slice that contains only the first occurrence of each element in slice.

func Uint8Clone

func Uint8Clone(in []uint8) []uint8

Uint8Clone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func Uint8Diff

func Uint8Diff(a, b []uint8, lessFunc func(a, b uint8) bool) (aOnly, bOnly []uint8)

Uint8Diff returns, given two sorted uint8 slices a and b, a slice of the elements occurring in a and b only, respectively.

func Uint8Difference

func Uint8Difference(slice1, slice2 []uint8) []uint8

Uint8Difference returns the array of elements in the first slice that aren't in the second slice

func Uint8Find

func Uint8Find(slice []uint8, elem uint8) int

Uint8Find returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func Uint8Union

func Uint8Union(slice1, slice2 []uint8) []uint8

Uint8Union returns the union array of slice1 and slice2 without duplicates

func Uint8Unique

func Uint8Unique(slice []uint8) []uint8

Uint8Unique returns a new slice that contains only the first occurrence of each element in slice.

func UintClone

func UintClone(in []uint) []uint

UintClone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func UintDiff

func UintDiff(a, b []uint, lessFunc func(a, b uint) bool) (aOnly, bOnly []uint)

UintDiff returns, given two sorted uint slices a and b, a slice of the elements occurring in a and b only, respectively.

func UintDifference

func UintDifference(slice1, slice2 []uint) []uint

UintDifference returns the array of elements in the first slice that aren't in the second slice

func UintFind

func UintFind(slice []uint, elem uint) int

UintFind returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func UintUnion

func UintUnion(slice1, slice2 []uint) []uint

UintUnion returns the union array of slice1 and slice2 without duplicates

func UintUnique

func UintUnique(slice []uint) []uint

UintUnique returns a new slice that contains only the first occurrence of each element in slice.

func UintptrClone

func UintptrClone(in []uintptr) []uintptr

UintptrClone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func UintptrDiff

func UintptrDiff(a, b []uintptr, lessFunc func(a, b uintptr) bool) (aOnly, bOnly []uintptr)

UintptrDiff returns, given two sorted uintptr slices a and b, a slice of the elements occurring in a and b only, respectively.

func UintptrDifference

func UintptrDifference(slice1, slice2 []uintptr) []uintptr

UintptrDifference returns the array of elements in the first slice that aren't in the second slice

func UintptrFind

func UintptrFind(slice []uintptr, elem uintptr) int

UintptrFind returns, given a slice and an element, the first index of elem in the slice, or -1 if the slice does not contain elem.

func UintptrUnion

func UintptrUnion(slice1, slice2 []uintptr) []uintptr

UintptrUnion returns the union array of slice1 and slice2 without duplicates

func UintptrUnique

func UintptrUnique(slice []uintptr) []uintptr

UintptrUnique returns a new slice that contains only the first occurrence of each element in slice.

Types

type ElemType

type ElemType generic.Type

ElemType is the generic element type of the slice.

func ConcatElemTypeSlices

func ConcatElemTypeSlices(slices ...[]ElemType) []ElemType

ConcatElemTypeSlices concatenates slices, returning a slice with newly allocated backing storage of the exact size.

func ElemTypeClone

func ElemTypeClone(in []ElemType) []ElemType

ElemTypeClone clones a slice, creating a new slice and copying the contents of the underlying array. If `in` is a nil slice, a nil slice is returned. If `in` is an empty slice, an empty slice is returned.

func ElemTypeDiff

func ElemTypeDiff(a, b []ElemType, lessFunc func(a, b ElemType) bool) (aOnly, bOnly []ElemType)

ElemTypeDiff returns, given two sorted ElemType slices a and b, a slice of the elements occurring in a and b only, respectively.

func ElemTypeDifference

func ElemTypeDifference(slice1, slice2 []ElemType) []ElemType

ElemTypeDifference returns the array of elements in the first slice that aren't in the second slice

func ElemTypeUnion

func ElemTypeUnion(slice1, slice2 []ElemType) []ElemType

ElemTypeUnion returns the union array of slice1 and slice2 without duplicates

func ElemTypeUnique

func ElemTypeUnique(slice []ElemType) []ElemType

ElemTypeUnique returns a new slice that contains only the first occurrence of each element in slice.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL