[#boost-urls-string_to_scheme]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::string&lowbar;to&lowbar;scheme
:relfileprefix: ../../
:mrdocs:

Return the known scheme for a non&hyphen;normalized string, if known

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/scheme.hpp#Lundefined[boost&sol;url&sol;scheme&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:boost/urls/scheme.adoc[scheme]
string&lowbar;to&lowbar;scheme(core::string&lowbar;view s) noexcept;
----

== Description

If the string does not identify a known scheme, the value xref:boost/urls/scheme.adoc[`scheme&colon;&colon;unknown`] is returned&period;

== BNF

[,cpp]
----
scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
----
== Specification

* https://datatracker.ietf.org/doc/html/rfc3986#section-3.1[3&period;1&period; Scheme (rfc3986)]

== Return Value

The known scheme

== Parameters

[cols="1,4"]
|===
|Name|Description

| *s*
| The string holding the scheme
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
