Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
static_url::remove_query

Remove the query.

Synopsis
static_url&
remove_query();
Description

If a query is present, it is removed. An empty query is distinct from having no query.

Example
assert( url( "http://www.example.com?id=42" ).[link url.ref.boost__urls__static_url.remove_query `remove_query`]().[link url.ref.boost__urls__static_url.buffer `buffer`]() == "http://www.example.com" );
Postconditions
this->[link url.ref.boost__urls__static_url.has_query `has_query`]() == false && this->[link url.ref.boost__urls__static_url.params `params`]().[link url.ref.boost__urls__params_base.empty `empty`]()
Exception Safety

Throws nothing.

BNF
[link url.ref.boost__urls__static_url.query `query`]           = *( pchar / "/" / "?" )

[link url.ref.boost__urls__static_url.query `query`]-param     = key [ "=" value ]
[link url.ref.boost__urls__static_url.query `query`]-[link url.ref.boost__urls__static_url.params `params`]    = [ [link url.ref.boost__urls__static_url.query `query`]-param ] *( "&" [link url.ref.boost__urls__static_url.query `query`]-param )
Specification
See Also

encoded_params, params, set_encoded_query, /root/project/libs/url/include/boost/url/static_url.hpp


PrevUpHomeNext