mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
fix comment on strings.LastIndex.
add bytes.LastIndex. add strings.Reader. R=r DELTA=59 (56 added, 0 deleted, 3 changed) OCL=35585 CL=35601
This commit is contained in:
parent
d0aac0ace1
commit
10c7d19e07
5 changed files with 59 additions and 3 deletions
|
|
@ -64,7 +64,7 @@ func Index(s, sep string) int {
|
|||
return -1
|
||||
}
|
||||
|
||||
// Index returns the index of the last instance of sep in s, or -1 if sep is not present in s.
|
||||
// LastIndex returns the index of the last instance of sep in s, or -1 if sep is not present in s.
|
||||
func LastIndex(s, sep string) int {
|
||||
n := len(sep);
|
||||
if n == 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue