[#boost-urls-make_pct_string_view]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::make&lowbar;pct&lowbar;string&lowbar;view
:relfileprefix: ../../
:mrdocs:


Return a valid percent&hyphen;encoded string

== Synopsis


Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/pct_string_view.hpp#L415[boost&sol;url&sol;pct&lowbar;string&lowbar;view&period;hpp]&gt;`

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

== Description


If `s` is a valid percent&hyphen;encoded string,    the function returns the buffer as a valid    view which may be used to perform decoding    or measurements&period;    Otherwise the result contains an error code&period;    Upon success, the returned view references    the original character buffer&semi;    Ownership is not transferred&period;


=== Complexity

Linear in `s&period;size()`&period;


=== Exception Safety

Throws nothing&period;



== Parameters


|===
| Name | Description

| *s*
| The string to validate&period;


|===



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