| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.convert; | 5 part of dart.convert; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * This class splits [String] values into individual lines. | 8 * This class splits [String] values into individual lines. |
| 9 */ | 9 */ |
| 10 class LineSplitter extends Converter<String, List<String>> { | 10 class LineSplitter extends Converter<String, List<String>> { |
| 11 |
| 12 const LineSplitter(); |
| 13 |
| 11 List<String> convert(String data) { | 14 List<String> convert(String data) { |
| 12 var lines = new List<String>(); | 15 var lines = new List<String>(); |
| 13 | 16 |
| 14 _LineSplitterSink._addSlice(data, 0, data.length, true, lines.add); | 17 _LineSplitterSink._addSlice(data, 0, data.length, true, lines.add); |
| 15 | 18 |
| 16 return lines; | 19 return lines; |
| 17 } | 20 } |
| 18 | 21 |
| 19 StringConversionSink startChunkedConversion( | 22 StringConversionSink startChunkedConversion( |
| 20 ChunkedConversionSink<String> sink) { | 23 ChunkedConversionSink<String> sink) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 if (isLast) { | 86 if (isLast) { |
| 84 // Add remaining | 87 // Add remaining |
| 85 adder(carry); | 88 adder(carry); |
| 86 } else { | 89 } else { |
| 87 return carry; | 90 return carry; |
| 88 } | 91 } |
| 89 } | 92 } |
| 90 return null; | 93 return null; |
| 91 } | 94 } |
| 92 } | 95 } |
| OLD | NEW |