| Index: sdk/lib/_internal/pub/lib/src/utils.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
|
| index 44f530a2778878fab52f6f1d10328d9496fdcc59..a53acb0ca6923c2fc028707c7d235ae6e41c037f 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/utils.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/utils.dart
|
| @@ -126,6 +126,16 @@ Set setMinus(Iterable minuend, Iterable subtrahend) {
|
| return minuendSet;
|
| }
|
|
|
| +/// Creates a map from [iter], using the return values of [keyFn] as the keys
|
| +/// and the return values of [valueFn] as the values.
|
| +Map listToMap(Iterable iter, keyFn(element), valueFn(element)) {
|
| + var map = new Map();
|
| + for (var element in iter) {
|
| + map[keyFn(element)] = valueFn(element);
|
| + }
|
| + return map;
|
| +}
|
| +
|
| /// Replace each instance of [matcher] in [source] with the return value of
|
| /// [fn].
|
| String replace(String source, Pattern matcher, String fn(Match)) {
|
|
|