Documentation ¶
Overview ¶
Package collections is a set of functions that help us work with slices and maps.
Index ¶
- func CompareInts32(lhs, rhs []int32) bool
- func CompareInts64(lhs, rhs []int64) bool
- func CompareStrings(lhs, rhs []string) bool
- func DifferenceInt32(a, b []int32) []int32
- func DifferenceInt64(a, b []int64) []int64
- func DifferenceStrings(a, b []string) []string
- func HasInt32(list []int32, search int32) bool
- func HasInt64(list []int64, search int64) bool
- func HasString(list []string, search string) bool
- func IndexString(list []string, search string) int
- func RemoveInt32(list []int32, remove int32) []int32
- func RemoveInt64(list []int64, remove int64) []int64
- func RemoveString(list []string, remove string) []string
- func ReverseInt32(list []int32) []int32
- func ReverseInt64(list []int64) []int64
- func ReverseString(list []string) []string
- func UniqueIntegers32(list []int32) []int32
- func UniqueIntegers64(list []int64) []int64
- func UniqueStrings(list []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareInts32 ¶
CompareInts32 returns true if the values of both lhs & rhs are the same.
func CompareInts64 ¶
CompareInts64 returns true if the values of both lhs & rhs are the same.
func CompareStrings ¶
CompareStrings returns true if the values of both lhs & rhs are the same.
func DifferenceInt32 ¶ added in v1.31.0
DifferenceInt32 returns the items present in a and not in b.
func DifferenceInt64 ¶ added in v1.31.0
DifferenceInt64 returns the items present in a and not in b.
func DifferenceStrings ¶
DifferenceStrings returns the items present in a and not in b.
func IndexString ¶ added in v1.55.0
IndexString returns the first position where search is found inside the list. If there is no coincidence it returns -1.
func RemoveInt32 ¶
RemoveInt32 return list without remove.
func RemoveInt64 ¶
RemoveInt64 return list without remove.
func RemoveString ¶
RemoveString return list without remove.
func ReverseString ¶
ReverseInt64 returns a reversed list
func UniqueIntegers32 ¶
UniqueIntegers32 returns list without any duplicates in it.
func UniqueIntegers64 ¶
UniqueIntegers64 returns list without any duplicates in it.
func UniqueStrings ¶
UniqueStrings returns list without any duplicates in it.
Types ¶
This section is empty.