Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
url::remove_origin

Remove the origin component.

Synopsis
url&
remove_origin();
Description

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

Example
assert( [link url.ref.boost__urls__url.url `url`]( "http://www.example.com/index.htm" ).[link url.ref.boost__urls__url.remove_origin `remove_origin`]().[link url.ref.boost__urls__url.buffer `buffer`]() == "/index.htm" );
Postconditions
this->[link url.ref.boost__urls__url.scheme_id `scheme_id`]() == [link url.ref.boost__urls__scheme `scheme::none`] && this->[link url.ref.boost__urls__url.has_authority `has_authority`]() == false
Complexity

Linear in this->size().

Exception Safety

Throws nothing.


PrevUpHomeNext