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

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

Issue 12303026: More comments to StringBuffers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot to save file. Created 7 years, 10 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
« no previous file with comments | « no previous file | sdk/lib/core/string_sink.dart » ('j') | sdk/lib/core/string_sink.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
11 */ 11 */
12 class StringBuffer implements StringSink { 12 class StringBuffer implements StringSink {
13 13
14 /// Creates the string buffer with an initial content. 14 /// Creates the string buffer with an initial content.
15 external StringBuffer([Object content = ""]); 15 external StringBuffer([Object content = ""]);
16 16
17 /// Returns the length of the buffer. 17 /// Returns the length of the content that has been accumulated so far.
18 /// This operation is in O(1).
Lasse Reichstein Nielsen 2013/02/20 09:32:16 It uses /** below and /// here. Please use /** for
floitsch 2013/02/21 13:49:03 Done.
18 external int get length; 19 external int get length;
19 20
20 /// Returns whether the buffer is empty. 21 /// Returns whether the buffer is empty. This operation is in O(1).
21 bool get isEmpty => length == 0; 22 bool get isEmpty => length == 0;
22 23
23 /** 24 /**
24 * Converts [obj] to a string and adds it to the buffer. 25 * Converts [obj] to a string and adds it to the buffer.
25 * 26 *
26 * *Deprecated*. Use [write] instead. 27 * *Deprecated*. Use [write] instead.
27 */ 28 */
28 @deprecated 29 @deprecated
29 void add(Object obj) => write(obj); 30 void add(Object obj) => write(obj);
30 31
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 * Clears the string buffer. 69 * Clears the string buffer.
69 * 70 *
70 * *Deprecated*. 71 * *Deprecated*.
71 */ 72 */
72 @deprecated 73 @deprecated
73 external void clear(); 74 external void clear();
74 75
75 /// Returns the contents of buffer as a concatenated string. 76 /// Returns the contents of buffer as a concatenated string.
76 external String toString(); 77 external String toString();
77 } 78 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/core/string_sink.dart » ('j') | sdk/lib/core/string_sink.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698