1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-03-01 00:35:28 +08:00

Slice: Add count func (#15)

Returns the count of matched elements
This commit is contained in:
donutloop
2022-01-06 13:32:14 +01:00
committed by GitHub
parent c7e961704d
commit 3905c0bde1
4 changed files with 37 additions and 0 deletions
+1
View File
@@ -421,6 +421,7 @@ func Union(slices ...interface{}) interface{} //slice并集, 去重
func UpdateByIndex(slice interface{}, index int, value interface{}) (interface{}, error) //在切片中index位置更新value
func Without(slice interface{}, values ...interface{}) interface{} //slice去除values
func GroupBy(slice, function interface{}) (interface{}, interface{}) //根据函数function的逻辑分slice为两组slice
func Count(slice, function interface{}) int
```
#### 10. strutil字符串处理包