slice

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsExistItem

func IsExistItem(value interface{}, array interface{}) bool

IsExistItem 判断slice中是否存在某个item

Types

type Array

type Array []interface{}

Array 数组

func Difference

func Difference(a, b interface{}) Array

Difference 差集

func Intersection

func Intersection(a, b interface{}) Array

Intersection 交集

func RemoveDuplicates

func RemoveDuplicates(array interface{}) Array

RemoveDuplicates 去掉slice中的重复项

func Union

func Union(a, b interface{}) Array

Union 并集, 两个slice A,B,把他们所有的元素合并在一起组成的slice

func (Array) ToFloat32Slice

func (array Array) ToFloat32Slice() []float32

ToFloat32Slice Convert to int slice

func (Array) ToFloat64Slice

func (array Array) ToFloat64Slice() []float64

ToFloat64Slice Convert to int slice

func (Array) ToIntSlice

func (array Array) ToIntSlice() []int

ToIntSlice Convert to int slice

func (Array) ToStringSlice

func (array Array) ToStringSlice() []string

ToStringSlice convert to string clice

Jump to

Keyboard shortcuts

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