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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/lib/core/string_buffer.dart

Issue 2698353003: unfork DDC's copy of most SDK libraries (Closed)
Patch Set: revert core_patch Created 3 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 part of dart.core;
6
7 /**
8 * A class for concatenating strings efficiently.
9 *
10 * Allows for the incremental building of a string using write*() methods.
11 * The strings are concatenated to a single string only when [toString] is
12 * called.
13 */
14 class StringBuffer implements StringSink {
15
16 /** Creates the string buffer with an initial content. */
17 external StringBuffer([Object content = ""]);
18
19 /**
20 * Returns the length of the content that has been accumulated so far.
21 * This is a constant-time operation.
22 */
23 external int get length;
24
25 /** Returns whether the buffer is empty. This is a constant-time operation. */
26 bool get isEmpty => length == 0;
27
28 /**
29 * Returns whether the buffer is not empty. This is a constant-time
30 * operation.
31 */
32 bool get isNotEmpty => !isEmpty;
33
34 /// Adds the contents of [obj], converted to a string, to the buffer.
35 external void write(Object obj);
36
37 /// Adds the string representation of [charCode] to the buffer.
38 external void writeCharCode(int charCode);
39
40 external void writeAll(Iterable objects, [String separator = ""]);
41
42 external void writeln([Object obj = ""]);
43
44 /**
45 * Clears the string buffer.
46 */
47 external void clear();
48
49 /// Returns the contents of buffer as a concatenated string.
50 external String toString();
51 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/lib/core/string.dart ('k') | pkg/dev_compiler/tool/input_sdk/lib/core/string_sink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698