增加字符串长度计算.

Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
rick.chan 2021-01-18 11:58:39 +08:00
parent 7e56c8a265
commit 3e2d39c1c4
1 changed files with 6 additions and 0 deletions

View File

@ -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"))
```