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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/utils.dart

Issue 566093003: Create binstubs for executables when activating a package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise! Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub_generated/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub_generated/lib/src/utils.dart b/sdk/lib/_internal/pub_generated/lib/src/utils.dart
index dcaf04417d560df5efb84f6c588b3bcf6a077584..5a842127ebf2d32d4697f48f30c417d82cdaccba 100644
--- a/sdk/lib/_internal/pub_generated/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/utils.dart
@@ -102,6 +102,11 @@ String padRight(String source, int length) {
}
return result.toString();
}
+String namedSequence(String name, Iterable iter, [String plural]) {
+ if (iter.length == 1) return "$name ${iter.single}";
+ if (plural == null) plural = "${name}s";
+ return "$plural ${toSentence(iter)}";
+}
String toSentence(Iterable iter) {
if (iter.length == 1) return iter.first.toString();
return iter.take(iter.length - 1).join(", ") + " and ${iter.last}";

Powered by Google App Engine
This is Rietveld 408576698