We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a9df5a commit 1db88e7Copy full SHA for 1db88e7
src/libcore/path.rs
@@ -200,9 +200,17 @@ fn splitext(p: path) -> (str, str) {
200
}
201
202
#[doc = "
203
-Removes extra '.' and '..' entries from paths
+Collapses redundant path separators.
204
205
Does not follow symbolic links.
206
+
207
+# Examples
208
209
+* '/a/../b' becomes '/b'
210
+* 'a/./b/' becomes 'a/b/'
211
+* 'a/b/../../../' becomes '..'
212
+* '/a/b/c/../d/./../../e/' becomes '/a/e/'
213
214
"]
215
fn normalize(p: path) -> path {
216
let s = split(p);
0 commit comments