Return true a scheme is present

Synopsis

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

bool
has_scheme() const noexcept;

Description

This function returns true if this contains a scheme.

Example

assert( url_view( "http://www.example.com" ).has_scheme() );

Complexity

Constant.

Exception Safety

Throws nothing.

BNF

URI             = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

absolute-URI    = scheme ":" hier-part [ "?" query ]

scheme          = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

Specification

Return Value

  • bool