mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
strings: fix minor bug in LastIndexFunc
R=r, rsc CC=golang-dev https://golang.org/cl/2250042
This commit is contained in:
parent
b11740fb6d
commit
8ee986570a
2 changed files with 2 additions and 1 deletions
|
|
@ -463,7 +463,7 @@ func lastIndexFunc(s string, f func(r int) bool, truth bool) int {
|
|||
}
|
||||
}
|
||||
if start < 0 {
|
||||
return -1
|
||||
start = 0
|
||||
}
|
||||
var wid int
|
||||
rune, wid = utf8.DecodeRuneInString(s[start:end])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue