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

Unified Diff: runtime/lib/string_base.dart

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file 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 | « runtime/lib/integers.dart ('k') | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('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 0698863195828191baf7a3af39db8f558aa5b829..9bc0264668ca62738d6ba57352f6d7e42a90c012 100644
--- a/runtime/lib/string_base.dart
+++ b/runtime/lib/string_base.dart
@@ -42,7 +42,7 @@ class _StringBase {
int get length native "String_getLength";
- bool isEmpty() {
+ bool get isEmpty {
return this.length === 0;
}
@@ -84,7 +84,7 @@ class _StringBase {
}
bool _substringMatches(int start, String other) {
- if (other.isEmpty()) return true;
+ if (other.isEmpty) return true;
if ((start < 0) || (start >= this.length)) {
return false;
}
@@ -109,7 +109,7 @@ class _StringBase {
}
int indexOf(String other, [int start = 0]) {
- if (other.isEmpty()) {
+ if (other.isEmpty) {
return start < this.length ? start : this.length;
}
if ((start < 0) || (start >= this.length)) {
@@ -126,7 +126,7 @@ class _StringBase {
int lastIndexOf(String other, [int start = null]) {
if (start == null) start = length - 1;
- if (other.isEmpty()) {
+ if (other.isEmpty) {
return min(this.length, start);
}
if (start >= this.length) {
« no previous file with comments | « runtime/lib/integers.dart ('k') | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698