diff --git a/README.md b/README.md index d45881f..db6c144 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ import "github.com/duke-git/lancet/v2/strutil" ## Example -Here takes the string function ReverseStr (reverse order string) as an example, and the strutil package needs to be imported. +Here takes the string function Reverse (reverse order string) as an example, and the strutil package needs to be imported. ```go package main @@ -62,7 +62,7 @@ import ( func main() { s := "hello" - rs := strutil.ReverseStr(s) + rs := strutil.Reverse(s) fmt.Println(rs) //olleh } ``` @@ -435,7 +435,7 @@ import "github.com/duke-git/lancet/v2/strutil" - [UpperFirst](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#UpperFirst) - [PadEnd](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#PadEnd) - [PadStart](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#PadStart) -- [ReverseStr](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#ReverseStr) +- [Reverse](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#Reverse) - [SnakeCase](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#SnakeCase) - [SplitEx](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#SplitEx) - [Wrap](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#Wrap) diff --git a/README_zh-CN.md b/README_zh-CN.md index a0cc63a..5664114 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -50,7 +50,7 @@ import "github.com/duke-git/lancet/v2/strutil" ## 例子 -此处以字符串工具函数ReverseStr(逆序字符串)为例,需要导入strutil包: +此处以字符串工具函数Reverse(逆序字符串)为例,需要导入strutil包: ```go package main @@ -62,7 +62,7 @@ import ( func main() { s := "hello" - rs := strutil.ReverseStr(s) + rs := strutil.Reverse(s) fmt.Println(rs) //olleh } ``` @@ -431,7 +431,7 @@ import "github.com/duke-git/lancet/v2/strutil" - [UpperFirst](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#UpperFirst) - [PadEnd](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#PadEnd) - [PadStart](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#PadStart) -- [ReverseStr](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#ReverseStr) +- [Reverse](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#Reverse) - [SnakeCase](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#SnakeCase) - [SplitEx](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#SplitEx) - [Wrap](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#Wrap) diff --git a/docs/strutil.md b/docs/strutil.md index 4be0046..9774517 100644 --- a/docs/strutil.md +++ b/docs/strutil.md @@ -32,7 +32,7 @@ import ( - [UpperFirst](#UpperFirst) - [PadEnd](#PadEnd) - [PadStart](#PadStart) -- [ReverseStr](#ReverseStr) +- [Reverse](#Reverse) - [SnakeCase](#SnakeCase) - [SplitEx](#SplitEx) - [Wrap](#Wrap) @@ -430,13 +430,13 @@ func main() { -### ReverseStr +### Reverse

Return string whose char order is reversed to the given string.

Signature: ```go -func ReverseStr(s string) string +func Reverse(s string) string ``` Example: diff --git a/docs/strutil_zh-CN.md b/docs/strutil_zh-CN.md index e0f97ff..9af5ad8 100644 --- a/docs/strutil_zh-CN.md +++ b/docs/strutil_zh-CN.md @@ -32,7 +32,7 @@ import ( - [UpperFirst](#UpperFirst) - [PadEnd](#PadEnd) - [PadStart](#PadStart) -- [ReverseStr](#ReverseStr) +- [Reverse](#Reverse) - [SnakeCase](#SnakeCase) - [SplitEx](#SplitEx) - [Wrap](#Wrap) @@ -431,13 +431,13 @@ func main() { -### ReverseStr +### Reverse

返回字符顺序与给定字符串相反的字符串

函数签名: ```go -func ReverseStr(s string) string +func Reverse(s string) string ``` 例子: