:relfileprefix: ../../../ [#boost-urls-decode_view-2constructor-03] == xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/decode_view.adoc[pass:[decode_view]]::decode_view Constructor === Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- explicit decode_view( xref:boost/urls/pct_string_view.adoc[pct_string_view] s, xref:boost/urls/encoding_opts.adoc[encoding_opts] opt = = {}) noexcept; ---- === Description This constructs a view from the character buffer `s`, which must remain valid and unmodified until the view is no longer accessed. [,cpp] ---- decode_view ds( "Program%20Files" ); ---- [,cpp] ---- this->encoded() == s ---- === Linear in `s.size()`. === Exceptions thrown on invalid input. === Exceptions |=== | Name | Thrown on | `The` | string contains an invalid percent encoding. |=== === Parameters |=== | Name | Description | *s* | A percent-encoded string that has already been validated. | *opt* | The options for decoding. If this parameter is omitted, the default options are used. |===