1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-15 18:22:27 +08:00

merge main

This commit is contained in:
dudaodong
2022-01-19 20:47:47 +08:00
6 changed files with 42 additions and 36 deletions

View File

@@ -434,7 +434,6 @@ func main() {
func Contain[T comparable](slice []T, value T) bool //判断slice是否包含value
func ContainSubSlice[T comparable](slice, subslice []T) bool //判断slice是否包含subslice
func Chunk[T any](slice []T, size int) [][]T //均分slice
func ConvertSlice(originalSlice interface{}, newSliceType reflect.Type) interface{} //将originalSlice转换为 newSliceType
func Difference[T comparable](slice1, slice2 []T) []T //返回切片其元素在slice1中不在slice2中
func DeleteByIndex[T any](slice []T, start int, end ...int) []T //删除切片中start到end位置的值(不包含end)
func Drop[T any](slice []T, n int) []T //创建一个新切片当n大于0时删除原切片前n个元素当n小于0时删除原切片后n个元素