From 3e2d39c1c455512e6f971ca7bb9a785b7d58b44f Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Mon, 18 Jan 2021 11:58:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E8=AE=A1=E7=AE=97.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- Software/Development/Language/Go/Basic/Go_语言字符串操作.md | 6 ++++++ 1 file changed, 6 insertions(+) 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")) +```