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

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

Issue 16206008: Fix-up RegExp implementations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Renaming startIndex to index. Add comment. Created 7 years, 6 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 * [Match] contains methods to manipulate a regular expression match. 8 * [Match] contains methods to manipulate a regular expression match.
9 * 9 *
10 * Iterables of [Match] objects are returned from [RegExp] matching methods. 10 * Iterables of [Match] objects are returned from [RegExp] matching methods.
11 * 11 *
12 * The following example finds all matches of a [RegExp] in a [String] 12 * The following example finds all matches of a [RegExp] in a [String]
13 * and iterates through the returned iterable of [Match] objects. 13 * and iterates through the returned iterable of [Match] objects.
14 * 14 *
15 * RegExp exp = new RegExp(r"(\w+)"); 15 * RegExp exp = new RegExp(r"(\w+)");
16 * String str = "Parse my string"; 16 * String str = "Parse my string";
17 * Iterable<Match> matches = exp.allMatches(str); 17 * Iterable<Match> matches = exp.allMatches(str);
18 * for (Match m in matches) { 18 * for (Match m in matches) {
19 * String match = m.group(0); 19 * String match = m.group(0);
20 * print(match); 20 * print(match);
21 * }; 21 * }
22 * 22 *
23 * The output of the example is: 23 * The output of the example is:
24 * 24 *
25 * Parse 25 * Parse
26 * my 26 * my
27 * string 27 * string
28 */ 28 */
29 abstract class Match { 29 abstract class Match {
30 /** 30 /**
31 * Returns the index in the string where the match starts. 31 * Returns the index in the string where the match starts.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 /** 131 /**
132 * Whether this regular expression matches multiple lines. 132 * Whether this regular expression matches multiple lines.
133 */ 133 */
134 bool get isMultiLine; 134 bool get isMultiLine;
135 135
136 /** 136 /**
137 * Whether this regular expression is case insensitive. 137 * Whether this regular expression is case insensitive.
138 */ 138 */
139 bool get isCaseSensitive; 139 bool get isCaseSensitive;
140 } 140 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/regexp_helper.dart ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698