Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
static_url_base::remove_query

(Inherited from url_base)

Remove the query.

Synopsis
url_base&
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" ).remove_query().buffer() == "http://www.example.com" );
Postconditions
this->has_query() == false && this->params().empty()
Exception Safety

Throws nothing.

BNF
query           = *( pchar / "/" / "?" )

query-param     = key [ "=" value ]
query-params    = [ query-param ] *( "&" query-param )
Specification
See Also

encoded_params, params, set_encoded_query, set_query.


PrevUpHomeNext