:relfileprefix: ../../../
[#985108242A73121E21F2F50A1D9C6394EB99A1AA]

= Function static_url::remove_userinfo

pass:v,q[Remove the userinfo]


== Synopsis

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

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

== Description

pass:v,q[This function removes the userinfo if] pass:v,q[present, without removing any authority.]

=== Example
[,cpp]
----
assert( url( "http://user@example.com" ).remove_userinfo().has_userinfo() == false );
----

=== Postconditions
[,cpp]
----
this->has_userinfo() == false && this->encoded_userinfo().empty == true
----

=== Complexity
pass:v,q[Linear in `this->size()`.]

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

=== BNF
[,cpp]
----
userinfo      = [ [ user ] [ ':' password ] ]

user          = *( unreserved / pct-encoded / sub-delims )
password      = *( unreserved / pct-encoded / sub-delims / ":" )
----

=== Specification

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.1[            3.2.1. User Information (rfc3986)]



== Return Value

* `` 




