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