Skip to content

Commit

Permalink
Merge pull request #78 from wangle201210/patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn authored Nov 21, 2024
2 parents 1373139 + abf6b2b commit b41ed99
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1040,22 +1040,22 @@ func ExampleStrArray_Replace() {

## `Reverse`

- 说明:将数组中的所有元素用倒序进行排序
- 说明:将数组中的所有元素反转
- 格式:

```go
Replace(array []string) *StrArray
```

- 示例:建立1个新数组,初始化后执行倒序操作并打印
- 示例:建立1个新数组,初始化后执行反转操作并打印

```go
func ExampleStrArray_Reverse() {
s := garray.NewStrArrayFrom(g.SliceStr{"a", "b", "c", "d", "e", "f", "g", "h"})
s := garray.NewStrArrayFrom(g.SliceStr{"a", "m", "c"})
fmt.Println(s.Reverse())

// Output:
// ["h","g","f","e","d","c","b","a"]
// ["c","m","a"]
}
```

Expand Down

0 comments on commit b41ed99

Please sign in to comment.