Documentation ¶
Index ¶
- func Copy[V any](slice []V) []V
- func CopyMatrix[V any](slice [][]V) [][]V
- func Del[V any](slice *[]V, index int)
- func GetEndPart[V any](slice []V, n int) []V
- func GetPart[V any](slice []V, start, end int) []V
- func GetStartPart[V any](slice []V, n int) []V
- func Insert[V any](slice *[]V, index int, value V)
- func Merge[V any](slices ...[]V) []V
- func Move[V any](slice *[]V, index, to int)
- func NextLoop[V any](slice []V, i int) (next int, value V)
- func PrevLoop[V any](slice []V, i int) (prev int, value V)
- func Reverse[V any](slice []V)
- func Shuffle[V any](slice []V)
- func Swap[V any](slice []V, i, j int)
- func ToMap[K comparable, V any](slice []V, key func(V) K) map[K]V
- func ToSet[V comparable](slice []V) map[V]struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEndPart ¶ added in v0.0.14
GetEndPart 获取数组的后 n 个元素
func GetStartPart ¶ added in v0.0.14
GetStartPart 获取数组的前 n 个元素
func ToMap ¶ added in v0.0.5
func ToMap[K comparable, V any](slice []V, key func(V) K) map[K]V
ToMap 将数组转换为 map
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.