OLD | NEW |
| (Empty) |
1 part of dart.core; | |
2 class StringBuffer implements StringSink {external StringBuffer([Object content
= ""]); | |
3 external int get length; | |
4 bool get isEmpty => length == 0; | |
5 bool get isNotEmpty => !isEmpty; | |
6 external void write(Object obj); | |
7 external void writeCharCode(int charCode); | |
8 void writeAll(Iterable objects, [String separator = ""]) { | |
9 Iterator iterator = objects.iterator; | |
10 if (!iterator.moveNext()) return; if (separator.isEmpty) { | |
11 do { | |
12 write(iterator.current); | |
13 } | |
14 while (iterator.moveNext());} | |
15 else { | |
16 write(iterator.current); | |
17 while (iterator.moveNext()) { | |
18 write(separator); | |
19 write(iterator.current); | |
20 } | |
21 } | |
22 } | |
23 void writeln([Object obj = ""]) { | |
24 write(obj); | |
25 write("\n"); | |
26 } | |
27 external void clear(); | |
28 external String toString(); | |
29 } | |
OLD | NEW |