]> Cypherpunks repositories - gostls13.git/commitdiff
regexp: document behavior of FindAll* functions when n < 0
authorDiogo Pinela <diogoid7400@gmail.com>
Sun, 25 Mar 2018 22:10:37 +0000 (23:10 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 28 Mar 2018 00:31:10 +0000 (00:31 +0000)
Fixes #24526

Change-Id: I0e38322fca12f9c88db836776920b9dfb66ff844
Reviewed-on: https://go-review.googlesource.com/102423
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Rob Pike <r@golang.org>
src/regexp/regexp.go

index 7d32d8d5a69589c349e625da3951b0a483947058..ae6ff237028a11dc6191b44728b927408ca2dde7 100644 (file)
@@ -30,8 +30,8 @@
 // matches of the entire expression. Empty matches abutting a preceding
 // match are ignored. The return value is a slice containing the successive
 // return values of the corresponding non-'All' routine. These routines take
-// an extra integer argument, n; if n >= 0, the function returns at most n
-// matches/submatches.
+// an extra integer argument, n. If n >= 0, the function returns at most n
+// matches/submatches; otherwise, it returns all of them.
 //
 // If 'String' is present, the argument is a string; otherwise it is a slice
 // of bytes; return values are adjusted as appropriate.