[#boost-urls-parse_path]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::parse&lowbar;path
:relfileprefix: ../../
:mrdocs:


Parse a string and return an encoded segment view

== Synopsis


Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/parse_path.hpp#L48[boost&sol;url&sol;parse&lowbar;path&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
system::result&lt;xref:boost/urls/segments_encoded_view.adoc[segments&lowbar;encoded&lowbar;view]&gt;
parse&lowbar;path(core::string&lowbar;view s) noexcept;
----

== Description


This function parses the string and returns the    corresponding path object if the string is valid,    otherwise returns an error&period;


=== BNF

[,cpp]
----
path          = [ "/" ] segment *( "/" segment )
----

=== Exception Safety

No&hyphen;throw guarantee&period;


=== Specification

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.3[3&period;3&period;  Path (rfc3986)]



== Return Value


A valid view on success, otherwise an    error code&period;



== Parameters


|===
| Name | Description

| *s*
| The string to parse


|===

== See Also


xref:boost/urls/segments_encoded_view.adoc[segments&lowbar;encoded&lowbar;view]&period;






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