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

Side by Side Diff: sdk/lib/core/regexp.dart

Issue 460613002: Add optional start index to Pattern.allMatches. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add extra test. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * A result from searching within a string. 8 * A result from searching within a string.
9 * 9 *
10 * A Match or an [Iterable] of Match objects is returned from [Pattern] 10 * A Match or an [Iterable] of Match objects is returned from [Pattern]
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 bool caseSensitive: true}); 128 bool caseSensitive: true});
129 129
130 /** 130 /**
131 * Searches for the first match of the regular expression 131 * Searches for the first match of the regular expression
132 * in the string [input]. Returns `null` if there is no match. 132 * in the string [input]. Returns `null` if there is no match.
133 */ 133 */
134 Match firstMatch(String input); 134 Match firstMatch(String input);
135 135
136 /** 136 /**
137 * Returns an iterable of the matches of the regular expression on [input]. 137 * Returns an iterable of the matches of the regular expression on [input].
138 *
139 * If [start] is provided, only start looking for matches at `start`.
138 */ 140 */
139 Iterable<Match> allMatches(String input); 141 Iterable<Match> allMatches(String input, [int start = 0]);
140 142
141 /** 143 /**
142 * Returns whether the regular expression has a match in the string [input]. 144 * Returns whether the regular expression has a match in the string [input].
143 */ 145 */
144 bool hasMatch(String input); 146 bool hasMatch(String input);
145 147
146 /** 148 /**
147 * Returns the first substring match of this regular expression in [input]. 149 * Returns the first substring match of this regular expression in [input].
148 */ 150 */
149 String stringMatch(String input); 151 String stringMatch(String input);
(...skipping 14 matching lines...) Expand all
164 166
165 /** 167 /**
166 * Whether this regular expression is case sensitive. 168 * Whether this regular expression is case sensitive.
167 * 169 *
168 * If the regular expression is not case sensitive, it will match an input 170 * If the regular expression is not case sensitive, it will match an input
169 * letter with a pattern letter even if the two letters are different case 171 * letter with a pattern letter even if the two letters are different case
170 * versions of the same letter. 172 * versions of the same letter.
171 */ 173 */
172 bool get isCaseSensitive; 174 bool get isCaseSensitive;
173 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698