Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
static_url_base::remove_fragment

(Inherited from url_base)

Remove the fragment.

Synopsis
url_base&
remove_fragment();
Description

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

Example
assert( [link url.ref.boost__urls__url_base.url `url`]( "?first=john&last=doe#anchor" ).[link url.ref.boost__urls__static_url_base.remove_fragment `remove_fragment`]().[link url.ref.boost__urls__static_url_base.buffer `buffer`]() == "?first=john&last=doe" );
Postconditions
this->[link url.ref.boost__urls__static_url_base.has_fragment `has_fragment`]() == false && this->[link url.ref.boost__urls__static_url_base.encoded_fragment `encoded_fragment`]() == ""
Complexity

Constant.

Exception Safety

Throws nothing.

BNF
[link url.ref.boost__urls__static_url_base.fragment `fragment`]    = *( pchar / "/" / "?" )
Specification
See Also

remove_fragment, set_encoded_fragment, set_fragment.


PrevUpHomeNext