[#boost-urls-url_view_base-has_scheme] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url_view_base.adoc[url_view_base]::has_scheme :relfileprefix: ../../../ :mrdocs: Return true a scheme is present == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_view_base.hpp#L352[boost/url/url_view_base.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool has_scheme() const noexcept; ---- == Description This function returns true if this contains a scheme. === Example [,cpp] ---- assert( url_view( "http://www.example.com" ).has_scheme() ); ---- === Complexity Constant. === Exception Safety Throws nothing. === BNF [,cpp] ---- URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] absolute-URI = scheme ":" hier-part [ "?" query ] scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.1[3.1. Scheme (rfc3986)] Return true a scheme is present This function returns true if this contains a scheme. === Example [,cpp] ---- assert( url_view( "http://www.example.com" ).has_scheme() ); ---- === Complexity Constant. === Exception Safety Throws nothing. === BNF [,cpp] ---- URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] absolute-URI = scheme ":" hier-part [ "?" query ] scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.1[3.1. Scheme (rfc3986)] == See Also xref:boost/urls/url_view_base/scheme.adoc[scheme], xref:boost/urls/url_view_base/scheme_id.adoc[scheme_id]. xref:boost/urls/url_view_base/scheme.adoc[scheme], xref:boost/urls/url_view_base/scheme_id.adoc[scheme_id]. [.small]#Created with https://www.mrdocs.com[MrDocs]#