slices

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllFloat32s added in v1.4.0

func AllFloat32s(s []float32, fn func(v float32) bool) bool

AllFloat32s applies a fn to each element of s (if s is empty, returns false), if all elements make that fn return true then AllFloat32s will return true, else return false.

func AllFloat64s added in v1.4.0

func AllFloat64s(s []float64, fn func(v float64) bool) bool

AllFloat64s applies a fn to each element of s (if s is empty, returns false), if all elements make that fn return true then AllFloat64s will return true, else return false.

func AllInt16s added in v1.4.0

func AllInt16s(s []int16, fn func(v int16) bool) bool

AllInt16s applies a fn to each element of s (if s is empty, returns false), if all elements make that fn return true then AllInt16s will return true, else return false.

func AllInt32s added in v1.4.0

func AllInt32s(s []int32, fn func(v int32) bool) bool

AllInt32s applies a fn to each element of s (if s is empty, returns false), if all elements make that fn return true then AllInt32s will return true, else return false.

func AllInt64s added in v1.4.0

func AllInt64s(s []int64, fn func(v int64) bool) bool

AllInt64s applies a fn to each element of s (if s is empty, returns false), if all elements make that fn return true then AllInt64s will return true, else return false.

func AllInt8s added in v1.4.0

func AllInt8s(s []int8, fn func(v int8) bool) bool

AllInt8s applies a fn to each element of s (if s is empty, returns false), if all elements make that fn return true then AllInt8s will return true, else return false.

func AllInts added in v1.4.0

func AllInts(s []int, fn func(v int) bool) bool

AllInts applies a fn to each element of s (if s is empty, returns false), if all elements make that fn return true then AllInts will return true, else return false.

func AllStrings added in v1.4.0

func AllStrings(s []string, fn func(v string) bool) bool

AllStrings applies a fn to each element of s (if s is empty, returns false), if all elements make that fn return true then AllStrings will return true, else return false.

func AnyFloat32s added in v1.4.0

func AnyFloat32s(s []float32, fn func(v float32) bool) bool

AnyFloat32s applies a fn to each element of s (if s is empty, returns false), if there exist at least one element make that fn return true then AnyFloat32s will return true, else return false.

func AnyFloat64s added in v1.4.0

func AnyFloat64s(s []float64, fn func(v float64) bool) bool

AnyFloat64s applies a fn to each element of s (if s is empty, returns false), if there exist at least one element make that fn return true then AnyFloat64s will return true, else return false.

func AnyInt16s added in v1.4.0

func AnyInt16s(s []int16, fn func(v int16) bool) bool

AnyInt16s applies a fn to each element of s (if s is empty, returns false), if there exist at least one element make that fn return true then AnyInt16s will return true, else return false.

func AnyInt32s added in v1.4.0

func AnyInt32s(s []int32, fn func(v int32) bool) bool

AnyInt32s applies a fn to each element of s (if s is empty, returns false), if there exist at least one element make that fn return true then AnyInt32s will return true, else return false.

func AnyInt64s added in v1.4.0

func AnyInt64s(s []int64, fn func(v int64) bool) bool

AnyInt64s applies a fn to each element of s (if s is empty, returns false), if there exist at least one element make that fn return true then AnyInt64s will return true, else return false.

func AnyInt8s added in v1.4.0

func AnyInt8s(s []int8, fn func(v int8) bool) bool

AnyInt8s applies a fn to each element of s (if s is empty, returns false), if there exist at least one element make that fn return true then AnyInt8s will return true, else return false.

func AnyInts added in v1.4.0

func AnyInts(s []int, fn func(v int) bool) bool

AnyInts applies a fn to each element of s (if s is empty, returns false), if there exist at least one element make that fn return true then AnyInts will return true, else return false.

func AnyStrings added in v1.4.0

func AnyStrings(s []string, fn func(v string) bool) bool

AnyStrings applies a fn to each element of s (if s is empty, returns false), if there exist at least one element make that fn return true then AnyStrings will return true, else return false.

func ContainFloat32s added in v1.4.0

func ContainFloat32s(s []float32, e float32) bool

ContainFloat32s returns true if s contain e.

func ContainFloat64s added in v1.4.0

func ContainFloat64s(s []float64, e float64) bool

ContainFloat64s returns true if s contain e.

func ContainInt16s added in v1.4.0

func ContainInt16s(s []int16, e int16) bool

ContainInt16s returns true if s contain e.

func ContainInt32s added in v1.4.0

func ContainInt32s(s []int32, e int32) bool

ContainInt32s returns true if s contain e.

func ContainInt64s added in v1.4.0

func ContainInt64s(s []int64, e int64) bool

ContainInt64s returns true if s contain e.

func ContainInt8s added in v1.4.0

func ContainInt8s(s []int8, e int8) bool

ContainInt8s returns true if s contain e.

func ContainInts added in v1.4.0

func ContainInts(s []int, e int) bool

ContainInts returns true if s contain e.

func ContainStrings added in v1.4.0

func ContainStrings(s []string, e string) bool

ContainStrings returns true if s contain e.

func ContainStringsIgnoreCase added in v1.4.0

func ContainStringsIgnoreCase(s []string, e string) bool

ContainStringsIgnoreCase returns true if s contain e, ignore case of element.

func DistinctFloat32s added in v1.4.0

func DistinctFloat32s(s []float32) []float32

DistinctFloat32s remove duplicate element in slices.

func DistinctFloat64s added in v1.4.0

func DistinctFloat64s(s []float64) []float64

DistinctFloat64s remove duplicate element in slices.

func DistinctInt16s added in v1.4.0

func DistinctInt16s(s []int16) []int16

DistinctInt16s remove duplicate element in slices.

func DistinctInt32s added in v1.4.0

func DistinctInt32s(s []int32) []int32

DistinctInt32s remove duplicate element in slices.

func DistinctInt64s added in v1.4.0

func DistinctInt64s(s []int64) []int64

DistinctInt64s remove duplicate element in slices.

func DistinctInt8s added in v1.4.0

func DistinctInt8s(s []int8) []int8

DistinctInt8s remove duplicate element in slices.

func DistinctInts added in v1.4.0

func DistinctInts(s []int) []int

DistinctInts remove duplicate element in slices.

func DistinctStrings added in v1.4.0

func DistinctStrings(s []string) []string

DistinctStrings remove duplicate element in slices.

func FilterFloat32s added in v1.4.0

func FilterFloat32s(s []float32, fn func(v float32) bool) []float32

FilterFloat32s applies a fn to each element of s, return a slices of make fn true.

func FilterFloat64s added in v1.4.0

func FilterFloat64s(s []float64, fn func(v float64) bool) []float64

FilterFloat64s applies a fn to each element of s, return a slices of make fn true.

func FilterInt16s added in v1.4.0

func FilterInt16s(s []int16, fn func(v int16) bool) []int16

FilterInt16s applies a fn to each element of s, return a slices of make fn true.

func FilterInt32s added in v1.4.0

func FilterInt32s(s []int32, fn func(v int32) bool) []int32

FilterInt32s applies a fn to each element of s, return a slices of make fn true.

func FilterInt64s added in v1.4.0

func FilterInt64s(s []int64, fn func(v int64) bool) []int64

FilterInt64s applies a fn to each element of s, return a slices of make fn true.

func FilterInt8s added in v1.4.0

func FilterInt8s(s []int8, fn func(v int8) bool) []int8

FilterInt8s applies a fn to each element of s, return a slices of make fn true.

func FilterInts added in v1.4.0

func FilterInts(s []int, fn func(v int) bool) []int

FilterInts applies a fn to each element of s, return a slices of make fn true.

func FilterStrings added in v1.4.0

func FilterStrings(s []string, fn func(v string) bool) []string

FilterStrings applies a fn to each element of s, return a slices of make fn true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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