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

Side by Side Diff: sdk/lib/async/string_transform.dart

Issue 11820024: Enable "part of" for the async library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « sdk/lib/async/stream_pipe.dart ('k') | sdk/lib/async/timer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.async; 5 part of dart.async;
6 6
7 abstract class _StringDecoder extends _StreamTransformer<List<int>, String> { 7 abstract class _StringDecoder extends _StreamTransformer<List<int>, String> {
8 8
9 handleData(List<int> bytes, StreamSink<String> sink) { 9 handleData(List<int> bytes, StreamSink<String> sink) {
10 var data = _carry; 10 var data = _carry;
11 data.addAll(bytes); 11 data.addAll(bytes);
12 _carry = []; 12 _carry = [];
13 var buffer = new StringBuffer(); 13 var buffer = new StringBuffer();
14 int pos = 0; 14 int pos = 0;
15 while (pos < data.length) { 15 while (pos < data.length) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // 10xxxxxx (xxxxxx is next 6 bits from the top). 118 // 10xxxxxx (xxxxxx is next 6 bits from the top).
119 bytes.add(((charCode >> (6 * (i - 1))) & 0x3F) | 0x80); 119 bytes.add(((charCode >> (6 * (i - 1))) & 0x3F) | 0x80);
120 } 120 }
121 pos += additionalBytes + 1; 121 pos += additionalBytes + 1;
122 } 122 }
123 return bytes; 123 return bytes;
124 } 124 }
125 } 125 }
126 126
127 127
OLDNEW
« no previous file with comments | « sdk/lib/async/stream_pipe.dart ('k') | sdk/lib/async/timer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698