:relfileprefix: ../../../
[#378E8116B7A381C0162BD2E86497E798215F390A]

= Function url::remove_fragment

pass:v,q[Remove the fragment]


== Synopsis

Declared in header `</boost/url/url.hpp#L481[boost/url/url.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/url.adoc[url]&
remove_fragment() noexcept;
----

== Description

pass:v,q[This function removes the fragment.] pass:v,q[An empty fragment is distinct from]
pass:v,q[having no fragment.]

=== Example
[,cpp]
----
assert( url( "?first=john&last=doe#anchor" ).remove_fragment().buffer() == "?first=john&last=doe" );
----

=== Postconditions
[,cpp]
----
this->has_fragment() == false && this->encoded_fragment() == ""
----

=== Complexity
pass:v,q[Constant.]

=== Exception Safety
pass:v,q[Throws nothing.]

=== BNF
[,cpp]
----
fragment    = *( pchar / "/" / "?" )
----

=== Specification

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.5[3.5.  Fragment]



== Return Value

* `` 




