Path.opBinary

Concatenation operator for paths.

- Concatenation of Path with Path will return Path - Concatenation of Path with string will return Path - Concatenation of string with Path will return string

  1. Path opBinary(Path other)
    struct Path
    pure nothrow
    opBinary
    (
    string op : "~"
    )
  2. Path opBinary(string other)

Examples

Test concatenation operators

import dshould;

(Path("a") ~ "b").should.equal(Path("a", "b"));
(Path("a") ~ Path("b")).should.equal(Path("a", "b"));

("a" ~ Path("b")).should.equal("a" ~ std.path.dirSeparator ~ "b");

Meta