Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1096)

Unified Diff: sdk/lib/core/pattern.dart

Issue 1272743004: Improve documentation for Pattern.allMatches. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/pattern.dart
diff --git a/sdk/lib/core/pattern.dart b/sdk/lib/core/pattern.dart
index cf898afff379470ed7a4baf08cc1e548e30831ee..1a9c32c7401781a44bf6dcfd3c04cd20b833703a 100644
--- a/sdk/lib/core/pattern.dart
+++ b/sdk/lib/core/pattern.dart
@@ -17,8 +17,10 @@ abstract class Pattern {
*
* If [start] is provided, matching will start at that index.
*
- * The iterable will contain all the non-overlapping matches of the
- * pattern on the string, ordered by start index.
+ * The returned iterable contains all the non-overlapping matches of the
+ * pattern on the string, ordered by start index. If possible, the
+ * matches are computed on demand. If a user only requests the first
+ * match, this function should not compute all possible matches.
Lasse Reichstein Nielsen 2015/08/11 10:15:39 Drop the "if possible" - just require it. It's an
floitsch 2015/08/11 11:25:25 Unfortunately the String.allMatches does it wrong
*
* The matches are found by repeatedly finding the first match
* of the pattern on the string, starting from the end of the previous
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698