URL.opBinary

The append operator (~).

The append operator for URLs returns a new URL with the given string appended as a path element to the URL's path. It only adds new path elements (or sequences of path elements).

Don't worry about path separators; whether you include them or not, it will just work.

Query elements are copied.

struct URL
pure
opBinary
(
string op : "~"
)

Examples

auto random = "http://testdata.org/random".parseURL;
auto randInt = random ~ "int";
writeln(randInt);  // prints "http://testdata.org/random/int"

Meta