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

Unified Diff: runtime/lib/growable_array.dart

Issue 13945009: Make default argument to Iterable.join be "". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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/array.dart ('k') | runtime/lib/typeddata.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index abfd4f98ca70c2f50a639552f30e72379cffc51b..ba0b90a16db6c22dc5f561cba632a1bef4ed6b1c 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -242,11 +242,11 @@ class _GrowableObjectArray<T> implements List<T> {
}
}
- String join([String separator]) {
+ String join([String separator = ""]) {
if (isEmpty) return "";
if (this.length == 1) return "${this[0]}";
StringBuffer buffer = new StringBuffer();
- if (separator == null || separator == "") {
+ if (separator.isEmpty) {
for (int i = 0; i < this.length; i++) {
buffer.write("${this[i]}");
}
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/typeddata.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698