Documentation
¶
Index ¶
- func ContainsValue[T comparable](slice []T, s T) bool
- func RemoveRepByLoop[T comparable](slc []T) []T
- func RemoveRepByMap[T comparable](stringSlice []T) []T
- func SliceDelete[T any](slice []T, index int) (err error, c []T)
- func SliceInsert[T any](slice []T, v T, index int) (err error, c []T)
- func SliceInsertEx[T any](slice []T, v []T, index int) (err error, c []T)
- func SliceMoveToBegin[T any](slice []T, index int) (err error, c []T)
- func SliceMoveToEnd[T any](slice []T, index int) (err error, c []T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveRepByLoop ¶
func RemoveRepByLoop[T comparable](slc []T) []T
RemoveRepByLoop 双重循环去重,切片中数据少时可用这种
func RemoveRepByMap ¶
func RemoveRepByMap[T comparable](stringSlice []T) []T
RemoveRepByMap 通过map主键唯一的特性过滤重复元素
func SliceDelete ¶
SliceDelete 删除指定位置的值
func SliceInsert ¶
SliceInsert 向指定位置插入值
func SliceInsertEx ¶
SliceInsertEx 向指定位置插入slice
func SliceMoveToBegin ¶
SliceMoveToBegin 将指定位置移到最前面
func SliceMoveToEnd ¶
SliceMoveToEnd 将指定位置移到最后面
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.