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

Unified Diff: pkg/path/lib/src/internal_style.dart

Issue 439223002: Add InternalStyle:rootLength to implement isAbsolute and rootPrefix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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: pkg/path/lib/src/internal_style.dart
diff --git a/pkg/path/lib/src/internal_style.dart b/pkg/path/lib/src/internal_style.dart
index 67b5d343eb748a40f868c4536df7d27b3262b6df..3a95745b87a9c383b1fea9729fbfc30a53cb86d5 100644
--- a/pkg/path/lib/src/internal_style.dart
+++ b/pkg/path/lib/src/internal_style.dart
@@ -33,6 +33,9 @@ abstract class InternalStyle extends Style {
/// "usr", an additional "/" is needed (making "file:///usr").
bool needsSeparator(String path);
+ /// Returns the offset of the root part. Returns 0 if the path is relative.
Bob Nystrom 2014/08/04 17:17:32 "Returns the offset" -> "The number of characters"
nweiz 2014/08/04 20:11:57 The style guide says the first sentence of doc com
Anders Johnsen 2014/08/05 08:57:13 Done.
Anders Johnsen 2014/08/05 08:57:13 Done.
+ int rootLength(String path);
+
/// Gets the root prefix of [path] if path is absolute. If [path] is relative,
/// returns `null`.
String getRoot(String path);

Powered by Google App Engine
This is Rietveld 408576698