diff --git a/README.md b/README.md index 7d69023..ef404ea 100644 --- a/README.md +++ b/README.md @@ -1621,7 +1621,8 @@ import "github.com/duke-git/lancet/v2/strutil" [[play](https://go.dev/play/p/HzLC9vsTwkf)] - **SubInBetween** : return substring between the start and end position(excluded) of source string. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/strutil.md#SubInBetween)] - +- **HammingDistance** : calculates the Hamming distance between two strings. + [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/strutil.md#HammingDistance)]

22. System package contain some functions about os, runtime, shell command.        index

diff --git a/README_zh-CN.md b/README_zh-CN.md index 03513b6..d50d431 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -1620,7 +1620,8 @@ import "github.com/duke-git/lancet/v2/strutil" [[play](https://go.dev/play/p/HzLC9vsTwkf)] - **SubInBetween** : 获取字符串中指定的起始字符串start和终止字符串end直接的子字符串。 [[doc](https://github.com/duke-git/lancet/blob/main/docs/api/packages/strutil.md#SubInBetween)] - +- **HammingDistance** : 计算两个字符串之间的汉明距离。 + [[doc](https://github.com/duke-git/lancet/blob/main/docs/api/packages/strutil.md#HammingDistance)]

22. system 包含 os, runtime, shell command 的相关函数。       回到目录

diff --git a/docs/api/packages/strutil.md b/docs/api/packages/strutil.md index 909161d..95f190d 100644 --- a/docs/api/packages/strutil.md +++ b/docs/api/packages/strutil.md @@ -1500,7 +1500,7 @@ func main() { ### HammingDistance -

TBD

+

计算两个字符串之间的汉明距离。汉明距离是指对应符号不同的位置数。

函数签名: diff --git a/docs/en/api/packages/strutil.md b/docs/en/api/packages/strutil.md index b184c45..676a8bd 100644 --- a/docs/en/api/packages/strutil.md +++ b/docs/en/api/packages/strutil.md @@ -1502,7 +1502,7 @@ func main() { ### HammingDistance -

HammingDistance calculates the Hamming distance between two strings. The Hamming distance is the number of positions at which the corresponding symbols are different

+

HammingDistance calculates the Hamming distance between two strings. The Hamming distance is the number of positions at which the corresponding symbols are different.

Signature: