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

Unified Diff: runtime/bin/path_impl.dart

Issue 11273041: Make first and last getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 2 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
« no previous file with comments | « runtime/bin/http_impl.dart ('k') | runtime/bin/string_stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/path_impl.dart
diff --git a/runtime/bin/path_impl.dart b/runtime/bin/path_impl.dart
index 2d04e9e83e1ed514e656d408bc1be899b14e8c38..d3467dfacd05c25a36abb30ee307dc6e4ca494e5 100644
--- a/runtime/bin/path_impl.dart
+++ b/runtime/bin/path_impl.dart
@@ -69,7 +69,7 @@ class _Path implements Path {
for (int i = common; i < pathSegments.length - 1; i++) {
sb.add('${pathSegments[i]}/');
}
- sb.add('${pathSegments.last()}');
+ sb.add('${pathSegments.last}');
if (hasTrailingSeparator) {
sb.add('/');
}
@@ -119,7 +119,7 @@ class _Path implements Path {
segs[pos] = null;
}
}
- if (segs.last() == '') segs.removeLast(); // Path ends with /.
+ if (segs.last == '') segs.removeLast(); // Path ends with /.
// No remaining segments can be ., .., or empty.
return !segs.some((s) => s == '' || s == '.' || s == '..');
}
@@ -146,7 +146,7 @@ class _Path implements Path {
} else {
newSegs.add('..');
}
- } else if (newSegs.last() == '..') {
+ } else if (newSegs.last == '..') {
newSegs.add('..');
} else {
newSegs.removeLast();
« no previous file with comments | « runtime/bin/http_impl.dart ('k') | runtime/bin/string_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698