[#378E8116B7A381C0162BD2E86497E798215F390A]

Function url:: remove_fragment

Remove the fragment

Synopsis

            url&
remove_fragment() noexcept;
        

Description

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

Example

assert( url( "?first=john&last=doe#anchor" ).remove_fragment().buffer() == "?first=john&last=doe" );

Postconditions

this->has_fragment() == false && this->encoded_fragment() == ""

Complexity

Constant.

Exception Safety

Throws nothing.

BNF

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

Specification

  • 3.5. Fragment