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

Unified Diff: sdk/lib/core/string_buffer.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
« no previous file with comments | « sdk/lib/core/string.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/string_buffer.dart
diff --git a/sdk/lib/core/string_buffer.dart b/sdk/lib/core/string_buffer.dart
index 8ea4bf1f5c8bacdf5f87d13476ca00702c60cee4..59d1aa909f0ff94aa2638d963158e06f9b33091e 100644
--- a/sdk/lib/core/string_buffer.dart
+++ b/sdk/lib/core/string_buffer.dart
@@ -23,6 +23,12 @@ class StringBuffer implements StringSink {
/** Returns whether the buffer is empty. This is a constant-time operation. */
bool get isEmpty => length == 0;
+ /**
+ * Returns whether the buffer is not empty. This is a constant-time
+ * operation.
+ */
+ bool get isNotEmpty => !isEmpty;
+
/// Adds the contents of [obj], converted to a string, to the buffer.
external void write(Object obj);
« no previous file with comments | « sdk/lib/core/string.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698