slices

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreNGreaterThanZero added in v0.5.0

func AreNGreaterThanZero(minCount int, val int, vals ...int) bool

func CopyFloat32s

func CopyFloat32s(vals []float32) []float32

func CopyFloat64s

func CopyFloat64s(vals []float64) []float64

func CopyInt32s

func CopyInt32s(vals []int32) []int32

func CopyInt64s

func CopyInt64s(vals []int64) []int64

func CopyInts

func CopyInts(vals []int) []int

func CopyStrings

func CopyStrings(vals []string) []string

func FilterStrs

func FilterStrs(strs []string, filterFn func(string) bool) []string

func FindDuplicateStrs

func FindDuplicateStrs(in []string) []string

func Float64PtrAvg added in v0.8.0

func Float64PtrAvg(values []*float64, weights []*float64) (*float64, error)

func Float64PtrMax added in v0.8.0

func Float64PtrMax(floats ...*float64) *float64

func Float64PtrMin added in v0.8.0

func Float64PtrMin(floats ...*float64) *float64

func Float64PtrSumInt added in v0.8.0

func Float64PtrSumInt(floats ...*float64) int

For adding integers stored in floats

func HasAllStrings

func HasAllStrings(queries []string, list []string) bool

func HasAnyStrings

func HasAnyStrings(queries []string, list []string) bool

func HasDuplicateStr

func HasDuplicateStr(in []string) bool

func HasFloat32

func HasFloat32(list []float32, query float32) bool

func HasFloat64

func HasFloat64(list []float64, query float64) bool

func HasInt

func HasInt(list []int, query int) bool

func HasInt32

func HasInt32(list []int32, query int32) bool

func HasInt64

func HasInt64(list []int64, query int64) bool

func HasString

func HasString(list []string, query string) bool

func MapStrs

func MapStrs(strs []string, mapFn func(string) string) []string

func MaxInt added in v0.4.0

func MaxInt(val int, vals ...int) int

func MergeStrSlices

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

func MinInt added in v0.4.0

func MinInt(val int, vals ...int) int

func RemoveEmpties

func RemoveEmpties(strs []string) []string

func RemoveEmptiesAndUnique

func RemoveEmptiesAndUnique(strs []string) []string

func SortFloat32s

func SortFloat32s(a []float32)

func SortFloat32sCopy

func SortFloat32sCopy(a []float32) []float32

func SortFloat64sCopy

func SortFloat64sCopy(a []float64) []float64

func SortInt32s

func SortInt32s(a []int32)

func SortInt32sCopy

func SortInt32sCopy(a []int32) []int32

func SortInt64s

func SortInt64s(a []int64)

func SortInt64sCopy

func SortInt64sCopy(a []int64) []int64

func SortIntsCopy

func SortIntsCopy(a []int) []int

func SortStrsCopy

func SortStrsCopy(a []string) []string

func StrSliceElementsMatch

func StrSliceElementsMatch(strs1 []string, strs2 []string) bool

func StrSlicesEqual

func StrSlicesEqual(strs1 []string, strs2 []string) bool

func SubtractStrSlice

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

func UniqueStrings

func UniqueStrings(strs []string) []string

func ZipStrsToMap

func ZipStrsToMap(strs1 []string, strs2 []string) map[string]string

Types

type Float32Slice

type Float32Slice []float32

func (Float32Slice) Len

func (p Float32Slice) Len() int

func (Float32Slice) Less

func (p Float32Slice) Less(i, j int) bool

func (Float32Slice) Swap

func (p Float32Slice) Swap(i, j int)

type Int32Slice

type Int32Slice []int32

func (Int32Slice) Len

func (p Int32Slice) Len() int

func (Int32Slice) Less

func (p Int32Slice) Less(i, j int) bool

func (Int32Slice) Swap

func (p Int32Slice) Swap(i, j int)

type Int64Slice

type Int64Slice []int64

func (Int64Slice) Len

func (p Int64Slice) Len() int

func (Int64Slice) Less

func (p Int64Slice) Less(i, j int) bool

func (Int64Slice) Swap

func (p Int64Slice) Swap(i, j int)

Jump to

Keyboard shortcuts

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