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

Unified Diff: utils/pub/utils.dart

Issue 11266050: Rename regexp methods to getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase and update status files with co19 issue number. Created 8 years, 2 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 | « tests/language/reg_ex2_test.dart ('k') | utils/template/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/utils.dart
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart
index 98cc79b92928642d439c2c3c1405d4ba2c7f7c13..21275f8b51bf084b8a42fd7429c1b9067e6180dd 100644
--- a/utils/pub/utils.dart
+++ b/utils/pub/utils.dart
@@ -97,8 +97,8 @@ String replace(String source, Pattern matcher, String fn(Match)) {
var buffer = new StringBuffer();
var start = 0;
for (var match in matcher.allMatches(source)) {
- buffer.add(source.substring(start, match.start()));
- start = match.end();
+ buffer.add(source.substring(start, match.start));
+ start = match.end;
buffer.add(fn(match));
}
buffer.add(source.substring(start));
@@ -110,7 +110,7 @@ String replace(String source, Pattern matcher, String fn(Match)) {
*/
bool endsWithPattern(String str, Pattern matcher) {
for (var match in matcher.allMatches(str)) {
- if (match.end() == str.length) return true;
+ if (match.end == str.length) return true;
}
return false;
}
« no previous file with comments | « tests/language/reg_ex2_test.dart ('k') | utils/template/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698