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:
Russ Cox 2009-10-12 10:09:35 -07:00
parent d0aac0ace1
commit 10c7d19e07
5 changed files with 59 additions and 3 deletions

View file

@ -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 {