Chromium Code Reviews| Index: sdk/lib/core/string_sink.dart |
| diff --git a/sdk/lib/core/string_sink.dart b/sdk/lib/core/string_sink.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4ba08dac818ff65103710d874c86cda2eac76c02 |
| --- /dev/null |
| +++ b/sdk/lib/core/string_sink.dart |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2013, 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; |
| + |
| +abstract class StringSink { |
| + |
| + /** |
| + * Converts [obj] to a String by invoking `toString` and adds the result to |
| + * this [StringSink]. |
| + */ |
| + void write(Object obj); |
| + |
| + /** |
| + * Converts [obj] to a String by invoking `toString` and adds the result to |
| + * this [StringSink]. Then adds a new line. |
| + */ |
| + void print(Object obj); |
| + |
| + /** |
| + * Adds the [charCode] to this [StringSink]. |
| + * |
| + * This method is equivalent to `write(new String.fromCharCode(charCode))`. |
| + */ |
| + void addCharCode(int charCode); |
|
kasperl
2013/02/11 07:51:53
Wouldn't writeCharCode be more consistent?
Lasse Reichstein Nielsen
2013/02/11 12:30:11
Agree.
floitsch
2013/02/11 17:10:49
Done.
floitsch
2013/02/11 17:10:49
Done.
|
| +} |