Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 41715b1c50.
PrevUpHomeNext
url_view::scheme

Return the scheme.

Synopsis
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( url_view( "http://www.example.com" ).scheme() == "http" );
Exception Safety

Throws nothing.

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

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

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

has_scheme, scheme_id.


PrevUpHomeNext