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 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 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.