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

Unified Diff: test/generated_sdk/lib/core/string_buffer.dart

Issue 1162723007: remove generated_sdk from checked in code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/generated_sdk/lib/core/string.dart ('k') | test/generated_sdk/lib/core/string_sink.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/generated_sdk/lib/core/string_buffer.dart
diff --git a/test/generated_sdk/lib/core/string_buffer.dart b/test/generated_sdk/lib/core/string_buffer.dart
deleted file mode 100644
index c48adf1805ab76e79c06a7b4952e0eff9278f6ea..0000000000000000000000000000000000000000
--- a/test/generated_sdk/lib/core/string_buffer.dart
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart.core;
-
-/**
- * A class for concatenating strings efficiently.
- *
- * Allows for the incremental building of a string using write*() methods.
- * The strings are concatenated to a single string only when [toString] is
- * called.
- */
-class StringBuffer implements StringSink {
-
- /** Creates the string buffer with an initial content. */
- StringBuffer([Object content = ""]) : _contents = '$content';
-
- /**
- * Returns the length of the content that has been accumulated so far.
- * This is a constant-time operation.
- */
- int get length => _contents.length;
-
- /** Returns whether the buffer is empty. This is a constant-time operation. */
- bool get isEmpty => length == 0;
-
- /**
- * Returns whether the buffer is not empty. This is a constant-time
- * operation.
- */
- bool get isNotEmpty => !isEmpty;
-
- /// Adds the contents of [obj], converted to a string, to the buffer.
- void write(Object obj) {
- _writeString('$obj');
- }
-
- /// Adds the string representation of [charCode] to the buffer.
- void writeCharCode(int charCode) {
- _writeString(new String.fromCharCode(charCode));
- }
-
- void writeAll(Iterable objects, [String separator = ""]) {
- Iterator iterator = objects.iterator;
- if (!iterator.moveNext()) return;
- if (separator.isEmpty) {
- do {
- write(iterator.current);
- } while (iterator.moveNext());
- } else {
- write(iterator.current);
- while (iterator.moveNext()) {
- write(separator);
- write(iterator.current);
- }
- }
- }
-
- void writeln([Object obj = ""]) {
- write(obj);
- write("\n");
- }
-
- /**
- * Clears the string buffer.
- */
- void clear() {
- _contents = "";
- }
-
- /// Returns the contents of buffer as a concatenated string.
- String toString() => Primitives.flattenString(_contents);
-
- String _contents;
-
- void _writeString(str) {
- _contents = Primitives.stringConcatUnchecked(_contents, str);
- }
-}
« no previous file with comments | « test/generated_sdk/lib/core/string.dart ('k') | test/generated_sdk/lib/core/string_sink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698