:relfileprefix: ../../../
[#D4DD93B750E891CCF01DD460019899CE13D0AF81]

= Function url_base::remove_scheme

pass:v,q[Remove the scheme]


== Synopsis

Declared in header `</boost/url/url_base.hpp#L316[boost/url/url_base.hpp,window=blank_]>`

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

== Description

pass:v,q[This function removes the scheme if it] pass:v,q[is present.]

=== Example
[,cpp]
----
assert( url("http://www.example.com/index.htm" ).remove_scheme().buffer() == "//www.example.com/index.htm" );
----

=== Postconditions
[,cpp]
----
this->has_scheme() == false && this->scheme_id() == scheme::none
----

=== Complexity
pass:v,q[Linear in `this->size()`.]

=== Exception Safety
pass:v,q[Throws nothing.]

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

=== Specification

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



== Return Value

* `` 




