From ed3e546000125e6ff79ed539440c7255aa5633b6 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Sat, 22 Sep 2012 05:54:21 +1000 Subject: [PATCH] [release-branch.go1] regexp: fix glitch in doc for FindReaderIndex MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ««« backport 6f790a92b3d2 regexp: fix glitch in doc for FindReaderIndex Fixes #3878. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6457054 »»» --- src/pkg/regexp/regexp.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index 4b329e9ccc..e4896a1c05 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -686,8 +686,9 @@ func (re *Regexp) FindStringIndex(s string) (loc []int) { // FindReaderIndex returns a two-element slice of integers defining the // location of the leftmost match of the regular expression in text read from -// the RuneReader. The match itself is at s[loc[0]:loc[1]]. A return -// value of nil indicates no match. +// the RuneReader. The match text was found in the input stream at +// byte offset loc[0] through loc[1]-1. +// A return value of nil indicates no match. func (re *Regexp) FindReaderIndex(r io.RuneReader) (loc []int) { a := re.doExecute(r, nil, "", 0, 2) if a == nil { -- 2.50.0