[#boost-urls-pct_string_view-2constructor-0c] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/pct_string_view.adoc[pct_string_view]::pct_string_view :relfileprefix: ../../../ :mrdocs: Constructor == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/pct_string_view.hpp#L153[boost/url/pct_string_view.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<std::convertible_to<core::string_view> String> requires std::is_convertible< String, core::string_view >::value constexpr pct_string_view(String const& s); ---- == Description The newly constructed string references the specified character buffer. Ownership is not transferred. === Postconditions [,cpp] ---- this->data() == core::string_view(s).data() ---- === Complexity Linear in `core::string_view(s).size()`. === Exception Safety Exceptions thrown on invalid input. == Exceptions |=== | Name | Thrown on | `system_error` | The string contains an invalid percent encoding. |=== == Template Parameters |=== | Name | Description | *String* | A type convertible to `core::string_view` |=== == Parameters |=== | Name | Description | *s* | The string to construct from. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#