:relfileprefix: ../../
[#boost-urls-string_to_scheme]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::string_to_scheme


Return the known scheme for a non-normalized string, if known


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/scheme.hpp#L141[boost/url/scheme.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/scheme.adoc[scheme]
string_to_scheme(core::string_view s) noexcept;
----

=== Description


If the string does not identify a known
scheme, the value
xref:boost/urls/scheme/unknown.adoc[scheme::unknown]
is
returned.
[,cpp]
----
scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
----

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.1[3.1. Scheme (rfc3986)]




=== Return Value


The known scheme



=== Parameters

|===
| Name | Description 

| *s*
| 
The string holding the scheme

|===




