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

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


Remove the origin component


== Synopsis

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

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

== Description


This function removes the origin, which
consists of the scheme and authority.

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

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

=== Complexity

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

=== Exception Safety

Throws nothing.








