:relfileprefix: ../../../
[#boost-urls-static_url-remove_scheme]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/static_url.adoc[pass:[static_url]]::remove_scheme


Remove the scheme


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/static_url.hpp#L349[boost/url/static_url.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/static_url.adoc[static_url]&
remove_scheme();
----

=== Description


This function removes the scheme if it
is present.
[,cpp]
----
assert( url("http://www.example.com/index.htm" ).remove_scheme().buffer() == "//www.example.com/index.htm" );
----
[,cpp]
----
this->has_scheme() == false && this->scheme_id() == scheme::none
----

=== Linear in `this-&gt;size()`.

=== Throws nothing.
[,cpp]
----
URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
----

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.1[            3.1. Scheme (rfc3986)]








=== See Also


xref:boost/urls/url_base/set_scheme.adoc[set_scheme]
.



