[#boost-urls-pct_string_view-2constructor-0d]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/pct_string_view.adoc[pct&lowbar;string&lowbar;view]::pct&lowbar;string&lowbar;view
:relfileprefix: ../../../
:mrdocs:


Constructor

== Synopsis


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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
pct&lowbar;string&lowbar;view(core::string&lowbar;view s);
----

== Description


The newly constructed string references        the specified character buffer&period; Ownership        is not transferred&period;


=== Postconditions

[,cpp]
----
this->data() == s.data() && this->size() == s.size()
----

=== Complexity

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


=== Exception Safety

Exceptions thrown on invalid input&period;



== Exceptions


|===
| Name | Thrown on

| `system&lowbar;error`
| The string contains an invalid percent encoding&period;


|===

== Parameters


|===
| Name | Description

| *s*
| The string to construct from&period;


|===



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