Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
static_url_base::scheme

(Inherited from url_view_base)

Return the scheme.

Synopsis
core::string_view
scheme() const;
Description

This function returns the scheme if it exists, without a trailing colon (':'). Otherwise it returns an empty string. Note that schemes are case-insensitive, and the canonical form is lowercased.

Example
assert( [link url.ref.boost__urls__url_view_base.url_view `url_view`]( "http://www.example.com" ).[link url.ref.boost__urls__static_url_base.scheme `scheme`]() == "http" );
Exception Safety

Throws nothing.

BNF
[link url.ref.boost__urls__static_url_base.scheme `scheme`]          = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

URI             = [link url.ref.boost__urls__static_url_base.scheme `scheme`] ":" hier-part [ "?" [link url.ref.boost__urls__static_url_base.query `query`] ] [ "#" [link url.ref.boost__urls__static_url_base.fragment `fragment`] ]

absolute-URI    = [link url.ref.boost__urls__static_url_base.scheme `scheme`] ":" hier-part [ "?" [link url.ref.boost__urls__static_url_base.query `query`] ]
Specification
See Also

has_scheme, scheme_id.


PrevUpHomeNext