Documentation
¶
Index ¶
- Constants
- func ApplyInt32s(l []int32, applyFunc func(n int32) int32)
- func ApplyInt64s(l []int64, applyFunc func(n int64) int64)
- func ApplyStrings(l []string, applyFunc func(s string) string)
- func ApplyUint32s(l []uint32, applyFunc func(n uint32) uint32)
- func ApplyUint64s(l []uint64, applyFunc func(n uint64) uint64)
- func IApplyInt32s(l []int32, applyFunc func(i int, n int32) int32)
- func IApplyInt64s(l []int64, applyFunc func(i int, n int64) int64)
- func IApplyStrings(l []string, applyFunc func(i int, s string) string)
- func IApplyUint32s(l []uint32, applyFunc func(i int, n uint32) uint32)
- func IApplyUint64s(l []uint64, applyFunc func(i int, n uint64) uint64)
- func InInt32s(l []int32, nums ...int32) bool
- func InInt64s(l []int64, nums ...int64) bool
- func InStrings(l []string, s ...string) bool
- func InUint32s(l []uint32, nums ...uint32) bool
- func InUint64s(l []uint64, nums ...uint64) bool
- func IndexAllInt32s(l []int32, nums ...int32) map[int32]int
- func IndexAllInt64s(l []int64, nums ...int64) map[int64]int
- func IndexAllStrings(l []string, s ...string) map[string]int
- func IndexAllUint32s(l []uint32, nums ...uint32) map[uint32]int
- func IndexAllUint64s(l []uint64, nums ...uint64) map[uint64]int
- func IndexInt32s(l []int32, num int32) int
- func IndexInt64s(l []int64, num int64) int
- func IndexStrings(l []string, s string) int
- func IndexUint32s(l []uint32, num uint32) int
- func IndexUint64s(l []uint64, num uint64) int
- func MergeInt32s(l ...[]int32) []int32
- func MergeInt64s(l ...[]int64) []int64
- func MergeStrings(l ...[]string) []string
- func MergeUint32s(l ...[]uint32) []uint32
- func MergeUint64s(l ...[]uint64) []uint64
- func OneInInt32s(l []int32, nums ...int32) bool
- func OneInInt64s(l []int64, nums ...int64) bool
- func OneInStrings(l []string, s ...string) bool
- func OneInUint32s(l []uint32, nums ...uint32) bool
- func OneInUint64s(l []uint64, nums ...uint64) bool
- func RSortBytesByLen(l [][]byte)
- func RSortInt32s(l []int32)
- func RSortInt64s(l []int64)
- func RSortStringsByLen(l []string)
- func RSortUint32s(l []uint32)
- func RSortUint64s(l []uint64)
- func ReverseInt32s(l []int32)
- func ReverseInt64s(l []int64)
- func ReverseStrings(l []string)
- func ReverseUint32s(l []uint32)
- func ReverseUint64s(l []uint64)
- func SortBytesByLen(l [][]byte)
- func SortInt32s(l []int32)
- func SortInt64s(l []int64)
- func SortStringsByLen(l []string)
- func SortUint32s(l []uint32)
- func SortUint64s(l []uint64)
- func UniqueInt32s(l []int32) []int32
- func UniqueInt64s(l []int64) []int64
- func UniqueMergeInt32s(l ...[]int32) []int32
- func UniqueMergeInt64s(l ...[]int64) []int64
- func UniqueMergeStrings(l ...[]string) []string
- func UniqueMergeUint32s(l ...[]uint32) []uint32
- func UniqueMergeUint64s(l ...[]uint64) []uint64
- func UniqueStrings(l []string) []string
- func UniqueUint32s(l []uint32) []uint32
- func UniqueUint64s(l []uint64) []uint64
Constants ¶
const (
// NotFoundTag ... indicate an element is not found
NotFoundTag = -1
)
Variables ¶
This section is empty.
Functions ¶
func ApplyInt32s ¶
ApplyInt32s ... Apply a function to each element in int32 slice
func ApplyInt64s ¶
ApplyInt64s ... Apply a function to each element in int64 slice
func ApplyStrings ¶
ApplyStrings ... Apply a function to each element in string slice
func ApplyUint32s ¶
ApplyUint32s ... Apply a function to each element in uint32 slice
func ApplyUint64s ¶
ApplyUint64s ... Apply a function to each element in uint64 slice
func IApplyInt32s ¶
IApplyInt32s ... Apply an index-related function to each element in int32 slice
func IApplyInt64s ¶
IApplyInt64s ... Apply an index-related function to each element in int64 slice
func IApplyStrings ¶
IApplyStrings ... Apply an index-related function to each element in string slice
func IApplyUint32s ¶
IApplyUint32s ... Apply an index-related function to each element in uint32 slice
func IApplyUint64s ¶
IApplyUint64s ... Apply an index-related function to each element in uint64 slice
func IndexAllInt32s ¶
IndexAllInt32s ... Find all positions of int32 nums in int32 slice and returns a maps (key: given nums, value: their positions, -1 if not found)
func IndexAllInt64s ¶
IndexAllInt64s ... Find all positions of int64 nums in int64 slice and returns a maps (key: given nums, value: their positions, -1 if not found)
func IndexAllStrings ¶
IndexAllStrings ... Find all positions of int64 nums in int64 slice... returns a maps (key: given nums, value: their positions, -1 if not found)
func IndexAllUint32s ¶
IndexAllUint32s ... Find all positions of uint32 nums in uint32 slice and returns a maps (key: given nums, value: their positions, -1 if not found)
func IndexAllUint64s ¶
IndexAllUint64s ... Find all positions of uint64 nums in uint64 slice and returns a maps (key: given nums, value: their positions, -1 if not found)
func IndexInt32s ¶
IndexInt32s ... Find the position of int32 num in int32 slice, return -1 if not found
func IndexInt64s ¶
IndexInt64s ... Find the position of int64 num in int64 slice, return -1 if not found
func IndexStrings ¶
IndexStrings ... Find the position of string in string slice, return -1 if not found
func IndexUint32s ¶
IndexUint32s ... Find the position of uint32 num in uint32 slice, return -1 if not found
func IndexUint64s ¶
IndexUint64s ... Find the position of uint64 num in uint64 slice, return -1 if not found
func MergeInt32s ¶
MergeInt32s ... Merge int32 slices into one int32 slice
func MergeInt64s ¶
MergeInt64s ... Merge int64 slices into one int64 slice
func MergeStrings ¶
MergeStrings ... Merge string slices into one string slice
func MergeUint32s ¶
MergeUint32s ... Merge uint32 slices into one uint32 slice
func MergeUint64s ¶
MergeUint64s ... Merge uint64 slices into one uint64 slice
func OneInInt32s ¶ added in v1.0.1
OneInInt32s ... Check if at least one int32 num in int32 slice
func OneInInt64s ¶ added in v1.0.1
OneInInt64s ... Check if at least one int64 num in int64 slice
func OneInStrings ¶ added in v1.0.1
OneInStrings ... Check if at least one string in string slice
func OneInUint32s ¶ added in v1.0.1
OneInUint32s ... Check if at least one uint32 num in uint32 slice
func OneInUint64s ¶ added in v1.0.1
OneInUint64s ... Check if at least one uint64 num in uint64 slice
func RSortBytesByLen ¶ added in v1.0.1
func RSortBytesByLen(l [][]byte)
RSortBytesByLen ... Reverse stable sort bytes slice by length of each bytes
func RSortStringsByLen ¶
func RSortStringsByLen(l []string)
RSortStringsByLen ... Reverse stable sort string slice by length of each string
func ReverseInt32s ¶ added in v1.0.1
func ReverseInt32s(l []int32)
ReverseInt32s ... Reverse int32 slice in-place
func ReverseInt64s ¶ added in v1.0.1
func ReverseInt64s(l []int64)
ReverseInt64s ... Reverse int64 slice in-place
func ReverseStrings ¶ added in v1.0.1
func ReverseStrings(l []string)
ReverseStrings ... Reverse string slice in-place
func ReverseUint32s ¶ added in v1.0.1
func ReverseUint32s(l []uint32)
ReverseUint32s ... Reverse uint32 slice in-place
func ReverseUint64s ¶ added in v1.0.1
func ReverseUint64s(l []uint64)
ReverseUint64s ... Reverse uint64 slice in-place
func SortBytesByLen ¶ added in v1.0.1
func SortBytesByLen(l [][]byte)
SortBytesByLen ... Stable sort bytes slice by length of each bytes
func SortStringsByLen ¶
func SortStringsByLen(l []string)
SortStringsByLen ... Stable sort string slice by length of each string
func UniqueInt32s ¶
UniqueInt32s ... Return a unique copy of given int32 slice
func UniqueInt64s ¶
UniqueInt64s ... Return a unique copy of given int64 slice
func UniqueMergeInt32s ¶
UniqueMergeInt32s ... Merge int32 slices into one int32 slice, excluding duplicated elements
func UniqueMergeInt64s ¶
UniqueMergeInt64s ... Merge int64 slices into one int64 slice, excluding duplicated elements
func UniqueMergeStrings ¶
UniqueMergeStrings ... Merge string slices into one string slice, excluding duplicated elements
func UniqueMergeUint32s ¶
UniqueMergeUint32s ... Merge uint32 slices into one uint32 slice, excluding duplicated elements
func UniqueMergeUint64s ¶
UniqueMergeUint64s ... Merge uint64 slices into one uint64 slice, excluding duplicated elements
func UniqueStrings ¶
UniqueStrings ... Return a unique copy of given string slice
func UniqueUint32s ¶
UniqueUint32s ... Return a unique copy of given uint32 slice
func UniqueUint64s ¶
UniqueUint64s ... Return a unique copy of given uint64 slice
Types ¶
This section is empty.