donutloop
0e1593c67b
Slice: Add SetToDefaultIf ( #187 )
...
SetToDefaultIf sets elements to their zero value if they match the given predicate.
It retains the positions of the elements in the slice.
It returns slice of T and the count of modified slice items
2024-02-28 11:27:23 +08:00
dudaodong
fa298b740d
add playground demo
2024-02-01 10:41:09 +08:00
dudaodong
d2d1e5a055
feat: refact DeleteAt and add DeleteRange function
2024-01-22 15:34:35 +08:00
dudaodong
ac2ecceaec
refactor: refact reduce function
2024-01-03 10:46:28 +08:00
dudaodong
96320069f4
doc: update for release v2.2.8
2023-12-11 15:30:33 +08:00
o98k
3802c715c3
[feature]<slice>: support random item ( #146 )
...
Signed-off-by: o98k-ok <hggend@gmail.com >
2023-11-22 16:51:37 +08:00
dudaodong
b698fec50f
doc: add go playground demo
2023-09-11 15:59:35 +08:00
dudaodong
541e6d4ea3
feat: add Partition for slice
2023-09-04 11:30:50 +08:00
dudaodong
4037b96cc4
refactor: update SortByField
2023-09-04 11:03:22 +08:00
dudaodong
bb563724c7
doc: add go playground demo
2023-08-01 11:01:57 +08:00
dudaodong
0d0848ac67
refactor: use for loop than for range
2023-07-10 10:56:53 +08:00
dudaodong
d5334f892f
feat: add Join
2023-07-10 10:51:43 +08:00
dudaodong
8229de2f10
test: add parallel running for all unit test functions
2023-06-30 10:18:45 +08:00
dudaodong
b1c6614549
refactor: clean code
2023-06-01 16:58:42 +08:00
dudaodong
f93c561f5d
doc: update go playground demo
2023-04-27 12:03:15 +08:00
dudaodong
4311b9ac66
test: remove t.Log()
2023-04-26 14:59:45 +08:00
dudaodong
01a3b139c0
doc: add document for new functions in slice and strutil package
2023-04-18 15:49:09 +08:00
dudaodong
fcb3b97b45
doc: add docment and playground demo for v2.1.19
2023-04-18 15:21:03 +08:00
dudaodong
52ea64bc33
feat: add FindLastBy function
2023-04-17 20:17:26 +08:00
燕归来
14bc08c6d6
feat: add FindBy that a result will be without unrefrence #88 ( #90 )
...
feat: add example for FindBy
chore: reduce code duplication
2023-04-17 20:11:56 +08:00
dudaodong
c01c9d14b4
feat: add ReduceRight
2023-04-04 17:54:54 +08:00
dudaodong
f198191063
feat: add ReduceBy
2023-04-04 17:41:37 +08:00
Mickls
3b497532f3
fix: The LastIndexOf method can never return the index of the first element ( #83 )
...
Co-authored-by: JiangCheng <jiangcheng@kezaihui.com >
2023-03-28 20:02:57 +08:00
dudaodong
f09e521783
doc: add go playground demo
2023-03-22 21:06:01 +08:00
dudaodong
0b80074bb7
refactor: remove unused code
2023-03-20 10:35:37 +08:00
dudaodong
d0ffc61842
doc: fix doc error
2023-03-16 10:36:06 +08:00
dudaodong
0734f220b3
feat: add ForEachWithBreak support break for each loop
2023-03-15 14:38:33 +08:00
dudaodong
71aa91a58d
doc: add go playground demo
2023-03-01 11:39:27 +08:00
dudaodong
9d2c9806d1
feat: add ContainBy function
2023-02-24 14:19:10 +08:00
dudaodong
f3801bcd8f
feat: add FlatMap
2023-02-24 11:14:59 +08:00
dudaodong
5767aad303
feat: add FilterMap
2023-02-24 10:55:27 +08:00
dudaodong
ca9ecb9c8a
update go playground demo
2023-02-16 14:10:24 +08:00
dudaodong
75b27c6540
feat: add IsSortedByKey
2023-02-10 10:10:57 +08:00
dudaodong
a7e77fa98d
feat: add IsSorted
2023-02-09 19:30:11 +08:00
dudaodong
abf392117a
feat: add IsAscending, Isdescending
2023-02-09 19:25:58 +08:00
dudaodong
d231d9f572
feat: add DropRightWhile
2023-02-09 17:53:26 +08:00
dudaodong
97447d058e
test: add test and example for DropWhile
2023-02-09 17:46:40 +08:00
dudaodong
040e112aa6
feat: add DropRight and DropWhile
2023-02-09 17:38:31 +08:00
dudaodong
d9c6294775
fix: fix goline error
2023-01-05 14:55:47 +08:00
dudaodong
d8505d1a5f
doc: update doc for slice package
2023-01-05 14:49:30 +08:00
dudaodong
6498c7d68a
test: add examples for slice package
2023-01-05 11:26:56 +08:00
dudaodong
5f0211f0c4
test: add examples for slice package
2023-01-04 14:44:10 +08:00
dudaodong
a70ec6ad1e
refactor: use constraints from golang.org/x/exp/constraints
2022-12-11 11:25:34 +08:00
Mickls
d59259bbe0
feat: A more reasonable IndexOf function ( #66 )
2022-12-09 11:31:40 +08:00
dudaodong
263ab7e316
clean code
2022-12-03 14:41:58 +08:00
dudaodong
18914ee2cd
feat: add deprecat IntSlice, InterfaceSlice and StringSlice
2022-12-03 14:00:44 +08:00
dudaodong
0a8058956f
feat: add Count and CountBy function
2022-12-03 13:04:12 +08:00
dudaodong
a044da7d2f
refactor: clean code
2022-12-03 12:58:25 +08:00
dudaodong
82c8a04c35
make SortByField function deprecate
2022-12-02 15:17:08 +08:00
dudaodong
280ecb5cef
feat: add SortBy function for slice
2022-12-02 14:53:57 +08:00