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

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

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 9 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/dartdoc/lib/src/dartdoc/utils.dart
diff --git a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
index d7595bdd137bdecf7a6524dd202740bb1beb91f8..e8cae413f8b5ff1bff6bfd706d5a89317456f9df 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
@@ -68,7 +68,7 @@ List<Mirror> orderByName(Iterable<Mirror> list) {
String joinWithCommas(List<String> items, [String conjunction = 'and']) {
if (items.length == 1) return items[0];
if (items.length == 2) return "${items[0]} $conjunction ${items[1]}";
- return '${items.getRange(0, items.length - 1).join(', ')}'
+ return '${items.take(items.length - 1).join(', ')}'
', $conjunction ${items[items.length - 1]}';
}

Powered by Google App Engine
This is Rietveld 408576698