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

Side by Side Diff: sdk/lib/core/string_buffer.dart

Issue 12870003: Make argument to StringSink.writeln optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fix. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * The StringBuffer class is useful for concatenating strings 8 * The StringBuffer class is useful for concatenating strings
9 * efficiently. Only on a call to [toString] are the strings 9 * efficiently. Only on a call to [toString] are the strings
10 * concatenated to a single String. 10 * concatenated to a single String.
(...skipping 15 matching lines...) Expand all
26 /// Adds the contents of [obj], converted to a string, to the buffer. 26 /// Adds the contents of [obj], converted to a string, to the buffer.
27 external void write(Object obj); 27 external void write(Object obj);
28 28
29 /// Adds the string representation of [charCode] to the buffer. 29 /// Adds the string representation of [charCode] to the buffer.
30 external void writeCharCode(int charCode); 30 external void writeCharCode(int charCode);
31 31
32 void writeAll(Iterable objects) { 32 void writeAll(Iterable objects) {
33 for (Object obj in objects) write(obj); 33 for (Object obj in objects) write(obj);
34 } 34 }
35 35
36 void writeln(Object obj) { 36 void writeln([Object obj = ""]) {
37 write(obj); 37 write(obj);
38 write("\n"); 38 write("\n");
39 } 39 }
40 40
41 /** 41 /**
42 * Clears the string buffer. 42 * Clears the string buffer.
43 */ 43 */
44 external void clear(); 44 external void clear();
45 45
46 /// Returns the contents of buffer as a concatenated string. 46 /// Returns the contents of buffer as a concatenated string.
47 external String toString(); 47 external String toString();
48 } 48 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/code_buffer.dart ('k') | sdk/lib/core/string_sink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698