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

Unified Diff: runtime/lib/string_base.dart

Issue 11230011: Make hasNext a getter instead of a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variable. 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 | « runtime/lib/byte_array.dart ('k') | runtime/vm/intrinsifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string_base.dart
diff --git a/runtime/lib/string_base.dart b/runtime/lib/string_base.dart
index 14bd6c2dfbc37e8cc5d041866794e67bca38c6bc..6b9c0489eb1915793ded787d2ec445119aab41ca 100644
--- a/runtime/lib/string_base.dart
+++ b/runtime/lib/string_base.dart
@@ -189,7 +189,7 @@ class _StringBase {
if (pattern is String) {
return indexOf(pattern, startIndex) >= 0;
}
- return pattern.allMatches(this.substring(startIndex)).iterator().hasNext();
+ return pattern.allMatches(this.substring(startIndex)).iterator().hasNext;
}
String replaceFirst(Pattern pattern, String replacement) {
@@ -202,7 +202,7 @@ class _StringBase {
StringBuffer buffer = new StringBuffer();
int startIndex = 0;
Iterator iterator = pattern.allMatches(this).iterator();
- if (iterator.hasNext()) {
+ if (iterator.hasNext) {
Match match = iterator.next();
buffer.add(this.substring(startIndex, match.start())).add(replacement);
startIndex = match.end();
@@ -265,7 +265,7 @@ class _StringBase {
List<String> split(Pattern pattern) {
int length = this.length;
Iterator iterator = pattern.allMatches(this).iterator();
- if (length == 0 && iterator.hasNext()) {
+ if (length == 0 && iterator.hasNext) {
// A matched empty string input returns the empty list.
return <String>[];
}
@@ -273,7 +273,7 @@ class _StringBase {
int startIndex = 0;
int previousIndex = 0;
while (true) {
- if (startIndex == length || !iterator.hasNext()) {
+ if (startIndex == length || !iterator.hasNext) {
result.add(this.substring(previousIndex, length));
break;
}
« no previous file with comments | « runtime/lib/byte_array.dart ('k') | runtime/vm/intrinsifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698