mirror of https://github.com/golang/go.git
regexp: fix glitch in doc for FindReaderIndex
Fixes #3878. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6457054
This commit is contained in:
parent
adc9337262
commit
4783ad82da
|
|
@ -686,8 +686,9 @@ func (re *Regexp) FindStringIndex(s string) (loc []int) {
|
||||||
|
|
||||||
// FindReaderIndex returns a two-element slice of integers defining the
|
// FindReaderIndex returns a two-element slice of integers defining the
|
||||||
// location of the leftmost match of the regular expression in text read from
|
// 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
|
// the RuneReader. The match text was found in the input stream at
|
||||||
// value of nil indicates no match.
|
// 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) {
|
func (re *Regexp) FindReaderIndex(r io.RuneReader) (loc []int) {
|
||||||
a := re.doExecute(r, nil, "", 0, 2)
|
a := re.doExecute(r, nil, "", 0, 2)
|
||||||
if a == nil {
|
if a == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue