From Jason Turner

[fs.path.append]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp8d0htqds/{from.md → to.md} +12 -10
tmp/tmp8d0htqds/{from.md → to.md} RENAMED
@@ -1,6 +1,6 @@
1
- ##### `path` appends <a id="fs.path.append">[[fs.path.append]]</a>
2
 
3
  The append operations use `operator/=` to denote their semantic effect
4
  of appending *preferred-separator* when needed.
5
 
6
  ``` cpp
@@ -23,26 +23,28 @@ Otherwise, modifies `*this` as if by these steps:
23
  pathname.
24
 
25
  [*Example 2*:
26
 
27
  Even if `//host` is interpreted as a *root-name*, both of the paths
28
- `path("//host")/"foo"` and `path("//host/")/"foo"` equal `"//host/foo"`.
 
29
 
30
  Expression examples:
31
 
32
  ``` cpp
33
  // On POSIX,
34
- path("foo") / ""; // yields "foo/"
35
- path("foo") / "/bar"; // yields "/bar"
36
- // On Windows, backslashes replace slashes in the above yields
37
 
38
  // On Windows,
39
- path("foo") / "c:/bar"; // yields "c:/bar"
40
- path("foo") / "c:"; // yields "c:"
41
- path("c:") / ""; // yields "c:"
42
- path("c:foo") / "/bar"; // yields "c:/bar"
43
- path("c:foo") / "c:bar"; // yields "c:foo/bar"
 
 
44
  ```
45
 
46
  — *end example*]
47
 
48
  *Returns:* `*this`.
 
1
+ ##### Appends <a id="fs.path.append">[[fs.path.append]]</a>
2
 
3
  The append operations use `operator/=` to denote their semantic effect
4
  of appending *preferred-separator* when needed.
5
 
6
  ``` cpp
 
23
  pathname.
24
 
25
  [*Example 2*:
26
 
27
  Even if `//host` is interpreted as a *root-name*, both of the paths
28
+ `path("//host")/"foo"` and `path("//host/")/"foo"` equal `"//host/foo"`
29
+ (although the former might use backslash as the preferred separator).
30
 
31
  Expression examples:
32
 
33
  ``` cpp
34
  // On POSIX,
35
+ path("foo") /= path(""); // yields path("foo/")
36
+ path("foo") /= path("/bar"); // yields path("/bar")
 
37
 
38
  // On Windows,
39
+ path("foo") /= path(""); // yields path("foo\{")}
40
+ path("foo") /= path("/bar"); // yields path("/bar")
41
+ path("foo") /= path("c:/bar"); // yields path("c:/bar")
42
+ path("foo") /= path("c:"); // yields path("c:")
43
+ path("c:") /= path(""); // yields path("c:")
44
+ path("c:foo") /= path("/bar"); // yields path("c:/bar")
45
+ path("c:foo") /= path("c:bar"); // yields path("c:foo\{bar")}
46
  ```
47
 
48
  — *end example*]
49
 
50
  *Returns:* `*this`.