[#boost-urls-url-remove_origin]
= xref:boost/urls/url/remove_origin.adoc[boost::urls::url::remove&lowbar;origin]
:relfileprefix: ../../../
:mrdocs:

Remove the origin component

== Synopsis

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

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

== Description

This function removes the origin, which consists of the scheme and authority&period;

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

== Exception Safety
Throws nothing&period;

== Return Value

`&ast;this`


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