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

Unified Diff: runtime/lib/string_buffer.dart

Issue 8510066: Fix String.trim implementation (follow spec). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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/string.dart ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string_buffer.dart
===================================================================
--- runtime/lib/string_buffer.dart (revision 1520)
+++ runtime/lib/string_buffer.dart (working copy)
@@ -32,7 +32,9 @@
*/
StringBuffer add(Object obj) {
String str = obj.toString();
- if (str === null || str.isEmpty()) return;
+ if (str === null || str.isEmpty()) {
+ return this;
+ }
_buffer.add(str);
_length += str.length;
return this;
« no previous file with comments | « runtime/lib/string.dart ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698