Documentation
¶
Index ¶
- func Append[S ~[]E, E any](s S, e E) S
- func Exist[S ~[]E, E comparable](s S, e E) bool
- func FindDuplicates[S ~[]E, E comparable](s S) (ret []E)
- func Join[S ~[]E, E any](s S, sep string) string
- func MapKeys[M ~map[K]V, K comparable, V any](m M) []K
- func Remove[S ~[]E, E comparable](s S, e E) (ret S)
- func RemoveDuplicates[S ~[]E, E comparable](s S) (ret S)
- func Reverse[S ~[]E, E any](s S)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindDuplicates ¶
func FindDuplicates[S ~[]E, E comparable](s S) (ret []E)
FindDuplicates 查找数组中的所有重复元素 FindDuplicates 查找切片中的所有重复元素
func MapKeys ¶
func MapKeys[M ~map[K]V, K comparable, V any](m M) []K
MapKeys 返回映射 m 中的所有键,按任意顺序返回一个键的切片
func RemoveDuplicates ¶
func RemoveDuplicates[S ~[]E, E comparable](s S) (ret S)
RemoveDuplicates 删除数组中的重复元素,返回一个新的数组,不改变原数组
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.