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

Unified Diff: dart/lib/uri/uri.dart

Issue 10383103: Split the URI library across multiple files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created helper.dart with SVN Created 8 years, 7 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 | « no previous file | dart/runtime/bin/bin.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/uri/uri.dart
diff --git a/dart/lib/uri/uri.dart b/dart/lib/uri/uri.dart
index a1856f7cfbf7f5c01e54d11ff810789ab05b0588..f35576b7b506514a5e66862e15298856a7dc8799 100644
--- a/dart/lib/uri/uri.dart
+++ b/dart/lib/uri/uri.dart
@@ -4,6 +4,8 @@
#library('uri');
+#source('helpers.dart');
+
/**
* A parsed URI, inspired by Closure's [URI][] class. Implements [RFC-3986][].
* [uri]: http://closure-library.googlecode.com/svn/docs/class_goog_Uri.html
@@ -188,27 +190,3 @@ class Uri {
}
}
}
-
-String merge(String base, String reference) {
- if (base == "") return "/$reference";
- return "${base.substring(0, base.lastIndexOf("/") + 1)}$reference";
-}
-
-String removeDotSegments(String path) {
- List<String> output = [];
- bool appendSlash = false;
- for (String segment in path.split("/")) {
- appendSlash = false;
- if (segment == "..") {
- if (!output.isEmpty() &&
- ((output.length != 1) || (output[0] != ""))) output.removeLast();
- appendSlash = true;
- } else if ("." == segment) {
- appendSlash = true;
- } else {
- output.add(segment);
- }
- }
- if (appendSlash) output.add("");
- return Strings.join(output, "/");
-}
« no previous file with comments | « no previous file | dart/runtime/bin/bin.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698