| OLD | NEW |
| 1 part of dart.core; | 1 part of dart.core; |
| 2 | 2 |
| 3 class StringBuffer implements StringSink { | 3 class StringBuffer implements StringSink { |
| 4 StringBuffer([Object content = ""]) : _contents = '$content'; | 4 external StringBuffer([Object content = ""]); |
| 5 int get length => DDC$RT.cast(_contents.length, dynamic, int, "CastGeneral", | 5 external int get length; |
| 6 """line 23, column 21 of dart:core/string_buffer.dart: """, | |
| 7 _contents.length is int, true); | |
| 8 bool get isEmpty => length == 0; | 6 bool get isEmpty => length == 0; |
| 9 bool get isNotEmpty => !isEmpty; | 7 bool get isNotEmpty => !isEmpty; |
| 10 void write(Object obj) { | 8 external void write(Object obj); |
| 11 _writeString('$obj'); | 9 external void writeCharCode(int charCode); |
| 12 } | |
| 13 void writeCharCode(int charCode) { | |
| 14 _writeString(new String.fromCharCode(charCode)); | |
| 15 } | |
| 16 void writeAll(Iterable objects, [String separator = ""]) { | 10 void writeAll(Iterable objects, [String separator = ""]) { |
| 17 Iterator iterator = objects.iterator; | 11 Iterator iterator = objects.iterator; |
| 18 if (!iterator.moveNext()) return; | 12 if (!iterator.moveNext()) return; |
| 19 if (separator.isEmpty) { | 13 if (separator.isEmpty) { |
| 20 do { | 14 do { |
| 21 write(iterator.current); | 15 write(iterator.current); |
| 22 } while (iterator.moveNext()); | 16 } while (iterator.moveNext()); |
| 23 } else { | 17 } else { |
| 24 write(iterator.current); | 18 write(iterator.current); |
| 25 while (iterator.moveNext()) { | 19 while (iterator.moveNext()) { |
| 26 write(separator); | 20 write(separator); |
| 27 write(iterator.current); | 21 write(iterator.current); |
| 28 } | 22 } |
| 29 } | 23 } |
| 30 } | 24 } |
| 31 void writeln([Object obj = ""]) { | 25 void writeln([Object obj = ""]) { |
| 32 write(obj); | 26 write(obj); |
| 33 write("\n"); | 27 write("\n"); |
| 34 } | 28 } |
| 35 void clear() { | 29 external void clear(); |
| 36 _contents = ""; | 30 external String toString(); |
| 37 } | |
| 38 String toString() => ((__x40) => DDC$RT.cast(__x40, dynamic, String, | |
| 39 "CastGeneral", """line 73, column 24 of dart:core/string_buffer.dart: """, | |
| 40 __x40 is String, true))(Primitives.flattenString(_contents)); | |
| 41 } | 31 } |
| OLD | NEW |