From e0c9ccbce3c7da04b6c5556e5a5ba81f0fef18b8 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Tue, 23 Jan 2024 17:27:28 +0800 Subject: [PATCH] doc: add DeleteRange --- README.md | 5 +++-- README_zh-CN.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b556272..951c1cc 100644 --- a/README.md +++ b/README.md @@ -1178,9 +1178,10 @@ import "github.com/duke-git/lancet/v2/slice" - **DifferenceWith** : accepts comparator which is invoked to compare elements of slice to values. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#DifferenceWith)] [[play](https://go.dev/play/p/v2U2deugKuV)] -- **DeleteAt** : delete the element of slice from specific start index to end index - 1. +- **DeleteAt** : delete the element of slice at index. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#DeleteAt)] - [[play](https://go.dev/play/p/pJ-d6MUWcvK)] +- **DeleteRange** : delete the element of slice from start index to end index(exclude). + [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#DeleteRange)] - **Drop** : drop n elements from the start of a slice. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#Drop)] [[play](https://go.dev/play/p/jnPO2yQsT8H)] diff --git a/README_zh-CN.md b/README_zh-CN.md index 84bf623..97fe71e 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -1177,9 +1177,10 @@ import "github.com/duke-git/lancet/v2/slice" - **DifferenceWith** : 接受比较器函数,该比较器被调用以将切片的元素与值进行比较。 结果值的顺序和引用由第一个切片确定。 [[doc](https://github.com/duke-git/lancet/blob/main/docs/api/packages/slice.md#DifferenceWith)] [[play](https://go.dev/play/p/v2U2deugKuV)] -- **DeleteAt** : 删除切片中指定开始索引到结束索引的元素。 +- **DeleteAt** : 删除切片中指定索引到的元素。 [[doc](https://github.com/duke-git/lancet/blob/main/docs/api/packages/slice.md#DeleteAt)] - [[play](https://go.dev/play/p/pJ-d6MUWcvK)] +- **DeleteRange** : 删除切片中指定开始索引到结束索引的元素。 + [[doc](https://github.com/duke-git/lancet/blob/main/docs/api/packages/slice.md#DeleteRange)] - **Drop** : 从切片头部删除 n 个元素。 [[doc](https://github.com/duke-git/lancet/blob/main/docs/api/packages/slice.md#Drop)] [[play](https://go.dev/play/p/jnPO2yQsT8H)]