1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

docs: change function name EqualWithFunc to EqualWith

This commit is contained in:
dudaodong
2022-06-15 15:24:58 +08:00
parent d57fa3b603
commit bf49db60d9
2 changed files with 8 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ import (
- [DeleteAt](#DeleteAt)
- [Drop](#Drop)
- [Equal](#Equal)
- [EqualWithFunc](#EqualWithFunc)
- [EqualWith](#EqualWith)
- [Every](#Every)
- [Filter](#Filter)
- [Find](#Find)
@@ -393,13 +393,13 @@ func main() {
### <span id="EqualWithFunc">EqualWithFunc</span>
### <span id="EqualWith">EqualWith</span>
<p>Check if two slices are equal with comparator func.</p>
<b>Signature:</b>
```go
func EqualWithFunc[T, U any](slice1 []T, slice2 []U, comparator func(T, U) bool) bool
func EqualWith[T, U any](slice1 []T, slice2 []U, comparator func(T, U) bool) bool
```
<b>Example:</b>
@@ -417,7 +417,7 @@ func main() {
return b == a*2
}
res := slice.EqualWithFunc(slice1, slice2, isDouble)
res := slice.EqualWith(slice1, slice2, isDouble)
fmt.Println(res) //true
}

View File

@@ -33,7 +33,7 @@ import (
- [Drop](#Drop)
- [Every](#Every)
- [Equal](#Equal)
- [EqualWithFunc](#EqualWithFunc)
- [EqualWith](#EqualWith)
- [Filter](#Filter)
- [Find](#Find)
- [FindLast](#FindLast)
@@ -426,13 +426,13 @@ func main() {
### <span id="EqualWithFunc">EqualWithFunc</span>
### <span id="EqualWith">EqualWith</span>
<p>检查两个切片是否相等相等条件对两个切片的元素调用比较函数comparator返回true</p>
<b>函数签名:</b>
```go
func EqualWithFunc[T, U any](slice1 []T, slice2 []U, comparator func(T, U) bool) bool
func EqualWith[T, U any](slice1 []T, slice2 []U, comparator func(T, U) bool) bool
```
<b>例子:</b>
@@ -450,7 +450,7 @@ func main() {
return b == a*2
}
res := slice.EqualWithFunc(slice1, slice2, isDouble)
res := slice.EqualWith(slice1, slice2, isDouble)
fmt.Println(res) //true
}