Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
static_url_base::remove_scheme

(Inherited from url_base)

Remove the scheme.

Synopsis
url_base&
remove_scheme();
Description

This function removes the scheme if it is present.

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

Linear in this->size().

Exception Safety

Throws nothing.

BNF
URI           = [link url.ref.boost__urls__static_url_base.scheme `scheme`] ":" hier-part [ "?" [link url.ref.boost__urls__static_url_base.query `query`] ] [ "#" [link url.ref.boost__urls__static_url_base.fragment `fragment`] ]
Specification
See Also

set_scheme.


PrevUpHomeNext