1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-10 07:42:27 +08:00

Merge branch 'v2' of github.com:duke-git/lancet into v2

This commit is contained in:
dudaodong
2022-01-09 22:15:18 +08:00
3 changed files with 14 additions and 15 deletions

View File

@@ -420,7 +420,7 @@ func Union(slices ...interface{}) interface{} //Union creates a slice of unique
func UpdateByIndex(slice interface{}, index int, value interface{}) (interface{}, error) //update the slice element at index.
func Without(slice interface{}, values ...interface{}) interface{} //creates a slice excluding all given values
func GroupBy(slice, function interface{}) (interface{}, interface{}) // groups slice into two categories
func Count(slice, function interface{}) int // Count iterates over elements of slice, returns a count of all matched elements
Count[T any](slice []T, fn func(index int, t T) bool) int // Count iterates over elements of slice, returns a count of all matched elements
```
#### 10. strutil is for processing string