Return true if the url is empty

Synopsis

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

bool
empty() const noexcept;

Description

The empty string matches the relative-ref grammar.

Example

assert( url_view( "" ).empty() );

Complexity

Constant.

Exception Safety

Throws nothing.

BNF

relative-ref  = relative-part [ "?" query ] [ "#" fragment ]

relative-part = "//" authority path-abempty
              / path-absolute
              / path-noscheme
              / path-empty

Return Value

  • bool