[#boost-urls-static_url-remove_scheme]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/static_url.adoc[static&lowbar;url]::remove&lowbar;scheme
:relfileprefix: ../../../
:mrdocs:

Remove the scheme

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/static_url.hpp#L351[boost&sol;url&sol;static&lowbar;url&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/static_url.adoc[static&lowbar;url]&
remove&lowbar;scheme();
----

== Description

This function removes the scheme if it is present&period;

== 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
Linear in `this&hyphen;&gt;size()`&period;

== Exception Safety
Throws nothing&period;

== BNF
[,cpp]
----
URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
----
== Specification
* https://datatracker.ietf.org/doc/html/rfc3986#section-3.1[]

== Return Value

`&ast;this`

== See Also

xref:boost/urls/static_url/set_scheme.adoc[`set&lowbar;scheme`]&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
