:relfileprefix: ../../../
[#F490029EC79B93CB45B28AF269B7C3C44F15A670]

= Function url_view_base::has_password

pass:v,q[Return true if a password is present]


== Synopsis

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

[source,cpp,subs="verbatim,macros,-callouts"]
----
bool
has_password() const noexcept;
----

== Description

pass:v,q[This function returns true if the] pass:v,q[userinfo is present and contains]
pass:v,q[a password.]

=== Example
[,cpp]
----
assert( url_view( "http://jane%2Ddoe:pass@example.com" ).has_password() );
----

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

=== 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

* `bool` 




