sliceutils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainInt

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

int 切片 是否包含元素

func ContainInt64

func ContainInt64(slice []int64, elem int64) bool

int64 切片 是否包含元素

func ContainString

func ContainString(slice []string, elem string) bool

string 切片 是否包含元素

func DistinctInt

func DistinctInt(slice []int) []int

int 切片 元素去重复

func DistinctInt64

func DistinctInt64(slice []int64) []int64

int64 切片 元素去重复

func DistinctString

func DistinctString(slice []string) []string

string 切片 元素去重复

func Float64s

func Float64s(a []float64)

func IndexInt

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

int 切片 元素下标

func IndexInt64

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

int64 切片 元素下标

func IndexString

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

string 切片 元素下标

func Int64s

func Int64s(a []int64)

func Ints

func Ints(a []int)

func RFloat64s

func RFloat64s(a []float64)

func RInt64s

func RInt64s(a []int64)

func RInts

func RInts(a []int)

func RStrings

func RStrings(a []string)

func RemoveInt

func RemoveInt(slice []int, elem ...int) []int

int 切片 删除元素

func RemoveInt64

func RemoveInt64(slice []int64, elem ...int64) []int64

int64 切片 删除元素

func RemoveString

func RemoveString(slice []string, elem ...string) []string

string 切片 删除元素

func Strings

func Strings(a []string)

func SumInt

func SumInt(source []int) (sum int)

func SumInt64

func SumInt64(source []int64) (sum int64)

Types

type Float64Slice

type Float64Slice []float64

float64 切片

func (Float64Slice) Len

func (p Float64Slice) Len() int

func (Float64Slice) Less

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

func (Float64Slice) Swap

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

type Int64Slice

type Int64Slice []int64

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)

type IntSlice

type IntSlice []int

int 切片

func (IntSlice) Len

func (p IntSlice) Len() int

func (IntSlice) Less

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

func (IntSlice) Swap

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

type StringMapInterface

type StringMapInterface struct {
	Key   string
	Value interface{}
}

map[string]interface 切片

type StringMapInterfaceSlice

type StringMapInterfaceSlice []StringMapInterface

func (StringMapInterfaceSlice) Len

func (s StringMapInterfaceSlice) Len() int

func (StringMapInterfaceSlice) Less

func (s StringMapInterfaceSlice) Less(i, j int) bool

func (StringMapInterfaceSlice) Swap

func (s StringMapInterfaceSlice) Swap(i, j int)

type StringMapString

type StringMapString struct {
	Key   string
	Value string
}

map[string]string 切片

type StringMapStringSlice

type StringMapStringSlice []StringMapString

func (StringMapStringSlice) Len

func (s StringMapStringSlice) Len() int

func (StringMapStringSlice) Less

func (s StringMapStringSlice) Less(i, j int) bool

func (StringMapStringSlice) Swap

func (s StringMapStringSlice) Swap(i, j int)

type StringSlice

type StringSlice []string

string 切片

func (StringSlice) Len

func (p StringSlice) Len() int

func (StringSlice) Less

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

func (StringSlice) Swap

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

Jump to

Keyboard shortcuts

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