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

Unified Diff: utils/dartdoc/utils.dart

Issue 8822001: Bunch of dartdoc changes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Default to showing source. Created 9 years 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
« no previous file with comments | « utils/dartdoc/static/styles.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/dartdoc/utils.dart
diff --git a/utils/dartdoc/utils.dart b/utils/dartdoc/utils.dart
index 2819020f7785c2f66ea0b99481437cc0e8396c2c..a77d5fcfeb6616681b2047964896368c8292c41c 100644
--- a/utils/dartdoc/utils.dart
+++ b/utils/dartdoc/utils.dart
@@ -54,3 +54,15 @@ String unindent(String text, int indentation) {
return text.substring(start);
}
+
+/** Sorts the map by the key, doing a case-insensitive comparison. */
+List orderByName(Map<String, Dynamic> map) {
+ // TODO(rnystrom): it'd be nice to have this in corelib.
+ List keys = map.getKeys();
+ keys.sort((x, y) => x.toUpperCase().compareTo(y.toUpperCase()));
+ final values = [];
+ for (var k in keys) {
+ values.add(map[k]);
+ }
+ return values;
+}
« no previous file with comments | « utils/dartdoc/static/styles.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698