skipOverURLProtocolPrefix

Try skip over leading protocol prefix part of an URL url.

Currently only skips either of the prefixes http:// and https://.

pure nothrow @safe @nogc
bool
skipOverURLProtocolPrefix
(
scope ref inout(char)[] url
)

Return Value

Type: bool

true iff skip was performed, false otherwise.

Examples

auto url = "http://www.sunet.se";
assert(url.skipOverURLProtocolPrefix());
assert(url  == "www.sunet.se");
auto url = "https://www.sunet.se";
assert(url.skipOverURLProtocolPrefix());
assert(url  == "www.sunet.se");

See Also

Meta