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

Side by Side Diff: pkg/http/lib/src/utils.dart

Issue 14426006: Rename dart:typeddata to dart:typed_data. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « pkg/http/lib/src/response.dart ('k') | runtime/bin/io.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 library utils; 5 library utils;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:crypto'; 8 import 'dart:crypto';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:typeddata'; 10 import 'dart:typed_data';
11 import 'dart:uri'; 11 import 'dart:uri';
12 import 'dart:utf'; 12 import 'dart:utf';
13 13
14 import 'byte_stream.dart'; 14 import 'byte_stream.dart';
15 15
16 /// Converts a URL query string (or `application/x-www-form-urlencoded` body) 16 /// Converts a URL query string (or `application/x-www-form-urlencoded` body)
17 /// into a [Map] from parameter names to values. 17 /// into a [Map] from parameter names to values.
18 /// 18 ///
19 /// queryToMap("foo=bar&baz=bang&qux"); 19 /// queryToMap("foo=bar&baz=bang&qux");
20 /// //=> {"foo": "bar", "baz": "bang", "qux": ""} 20 /// //=> {"foo": "bar", "baz": "bang", "qux": ""}
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 /// The return values of all [Future]s are discarded. Any errors will cause the 232 /// The return values of all [Future]s are discarded. Any errors will cause the
233 /// iteration to stop and will be piped through the return value. 233 /// iteration to stop and will be piped through the return value.
234 Future forEachFuture(Iterable input, Future fn(element)) { 234 Future forEachFuture(Iterable input, Future fn(element)) {
235 var iterator = input.iterator; 235 var iterator = input.iterator;
236 Future nextElement(_) { 236 Future nextElement(_) {
237 if (!iterator.moveNext()) return new Future.value(); 237 if (!iterator.moveNext()) return new Future.value();
238 return fn(iterator.current).then(nextElement); 238 return fn(iterator.current).then(nextElement);
239 } 239 }
240 return nextElement(null); 240 return nextElement(null);
241 } 241 }
OLDNEW
« no previous file with comments | « pkg/http/lib/src/response.dart ('k') | runtime/bin/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698