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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_string.dart

Issue 15263004: Adding isNotEmpty property to collection and string. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix template generation Created 7 years, 7 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
Index: sdk/lib/_internal/compiler/implementation/lib/js_string.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_string.dart b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
index 04cfa7d7c9250c414b7e8a9c224eaed5798242d6..610f7f812d97450f8f0d56f4e3d2d2b2459ed87f 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
@@ -227,6 +227,8 @@ class JSString extends Interceptor implements String, JSIndexable {
bool get isEmpty => length == 0;
+ bool get isNotEmpty => !isEmpty;
+
int compareTo(String other) {
if (other is !String) throw new ArgumentError(other);
return this == other ? 0

Powered by Google App Engine
This is Rietveld 408576698