package
Version:
v0.0.0-...-ffbb05e
Opens a new window with list of versions in this module.
Published: Apr 15, 2025
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Chunk[T any, Slice ~[]T](collection Slice, size int) []Slice
Chunk 对切片进行分块,分块的长度为size
func Reverse[T any, Slice ~[]T](collection Slice)
Reverse 对切片进行逆序
func Set[T comparable, Slice ~[]T](collection Slice) map[T]struct{}
Set 使用切片元素构造集合
func Shuffle[T any, Slice ~[]T](collection Slice) Slice
Shuffle 打乱切片元素顺序
func Uniq[T comparable, Slice ~[]T](collection Slice) Slice
Uniq 对切片元素进行去重
Source Files
¶
Click to show internal directories.
Click to hide internal directories.