boost::urls::url_base::remove_fragment

Remove the fragment

Synopsis

url_base&
remove_fragment() noexcept;
cpp

Description

This function removes the fragment. An empty fragment is distinct from having no fragment.

assert( url( "?first=john&last=doe#anchor" ).remove_fragment().buffer() == "?first=john&last=doe" );
cpp
this->has_fragment() == false && this->encoded_fragment() == ""
cpp

Complexity

Constant.

Exception Safety

Throws nothing.

fragment    = *( pchar / "/" / "?" )
cpp