diff --git a/Software/Development/Language/Go/Basic/Go_语言字符串操作.md b/Software/Development/Language/Go/Basic/Go_语言字符串操作.md index 3fc7417..09f5050 100644 --- a/Software/Development/Language/Go/Basic/Go_语言字符串操作.md +++ b/Software/Development/Language/Go/Basic/Go_语言字符串操作.md @@ -34,3 +34,9 @@ strings.Count("widuu", "u") // 在一段字符串中有多少匹配到的字 strings.Index("widuu", "i") // 查找字符串, 然后返回当前的位置, return 1 strings.Index("widuu", "u") // 查找字符串, 然后返回当前的位置, return 3 ``` + +## 4.字符串长度 + +```go +fmt.Println(len("Hello")) +```