mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:06:41 +08:00
@@ -62,7 +62,7 @@ strings.LastIndex(s, str string) int
|
|||||||
如果 `ch` 是非 ASCII 编码的字符,建议使用以下函数来对字符进行定位:
|
如果 `ch` 是非 ASCII 编码的字符,建议使用以下函数来对字符进行定位:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
strings.IndexRune(s string, ch int) int
|
strings.IndexRune(s string, r rune) int
|
||||||
```
|
```
|
||||||
|
|
||||||
示例 4.14 [index_in_string.go](examples/chapter_4/index_in_string.go)
|
示例 4.14 [index_in_string.go](examples/chapter_4/index_in_string.go)
|
||||||
|
Reference in New Issue
Block a user