[#boost-urls-decode_view-2constructor-03] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/decode_view.adoc[decode_view]::decode_view :relfileprefix: ../../../ :mrdocs: Constructor == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/decode_view.hpp#L199[boost/url/decode_view.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr 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. === Example [,cpp] ---- decode_view ds( "Program%20Files" ); ---- === Postconditions [,cpp] ---- this->encoded() == s ---- === Complexity Linear in `s.size()`. === Exception Safety Although this function does not throw exceptions, implicitly constructing a xref:boost/urls/pct_string_view.adoc[pct_string_view] for the first argument can throw exceptions on invalid input. == Parameters |=== | Name | Description | *s* | A percent‐encoded string that has already been validated. Implicit conversion from other string types is supported but may throw exceptions. | *opt* | The options for decoding. If this parameter is omitted, the default options are used. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#