resolveLink

nothrow pure @safe
resolveLink

Examples

auto context = LoadingContext(
    "http://example.com/base",
    [
        "acid": "http://example.com/acid#",
    ]
);

enum zero = "http://example.com/base/zero";
assert(zero.resolveLink(context) == zero);

assert("one".resolveLink(context) == "http://example.com/one");
assert("two".resolveLink(context) == "http://example.com/two");
assert("#three".resolveLink(context) == "http://example.com/base#three");
assert("four#five".resolveLink(context) == "http://example.com/four#five");
assert("acid:six".resolveLink(context) == "http://example.com/acid#six");

See Also

Meta