Index: runtime/lib/string_buffer_patch.dart |
diff --git a/runtime/lib/string_buffer_patch.dart b/runtime/lib/string_buffer_patch.dart |
index a952f8aa730484d3baa7c641ca882e7e660cccc8..6991ead060e0225bb5734b9166d7683c6f3d5f65 100644 |
--- a/runtime/lib/string_buffer_patch.dart |
+++ b/runtime/lib/string_buffer_patch.dart |
@@ -91,6 +91,27 @@ patch class StringBuffer { |
} |
} |
+ /* patch */ void writeAll(Iterable objects, [String separator = ""]) { |
+ Iterator iterator = objects.iterator; |
+ if (!iterator.moveNext()) return; |
+ if (separator.isEmpty) { |
+ do { |
+ write(iterator.current); |
+ } while (iterator.moveNext()); |
+ } else { |
+ write(iterator.current); |
+ while (iterator.moveNext()) { |
+ write(separator); |
+ write(iterator.current); |
+ } |
+ } |
+ } |
+ |
+ /* patch */ void writeln([Object obj = ""]) { |
+ write(obj); |
+ write("\n"); |
+ } |
+ |
/** Makes the buffer empty. */ |
/* patch */ void clear() { |
_parts = null; |