Skip to content

Commit 9d84e0e

Browse files
dpinelabradfitz
authored andcommitted
regexp: document behavior of FindAll* functions when n < 0
Fixes #24526 Change-Id: I0e38322fca12f9c88db836776920b9dfb66ff844 Reviewed-on: https://go-review.googlesource.com/102423 Reviewed-by: Emmanuel Odeke <[email protected]> Reviewed-by: Rob Pike <[email protected]>
1 parent 976a852 commit 9d84e0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/regexp/regexp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
// matches of the entire expression. Empty matches abutting a preceding
3131
// match are ignored. The return value is a slice containing the successive
3232
// return values of the corresponding non-'All' routine. These routines take
33-
// an extra integer argument, n; if n >= 0, the function returns at most n
34-
// matches/submatches.
33+
// an extra integer argument, n. If n >= 0, the function returns at most n
34+
// matches/submatches; otherwise, it returns all of them.
3535
//
3636
// If 'String' is present, the argument is a string; otherwise it is a slice
3737
// of bytes; return values are adjusted as appropriate.

0 commit comments

Comments
 (0)