:relfileprefix: ../../../ [#boost-urls-url_view_base-scheme] = xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/url_view_base.adoc[pass:[url_view_base]]::scheme Return the scheme == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- core::string_view scheme() const noexcept; ---- == 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 [,cpp] ---- assert( url_view( "http://www.example.com" ).scheme() == "http" ); ---- === Exception Safety Throws nothing. === BNF [,cpp] ---- scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] absolute-URI = scheme ":" hier-part [ "?" query ] ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.1[3.1. Scheme (rfc3986)] == See Also xref:boost/urls/url_view_base/has_scheme.adoc[has_scheme] , xref:boost/urls/url_view_base/scheme_id.adoc[scheme_id] .