[#boost-urls-decode_view]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::decode&lowbar;view
:relfileprefix: ../../
:mrdocs:

A reference to a valid, percent&hyphen;encoded string

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class decode&lowbar;view;
----

== Description

These views reference strings in parts of URLs or other components that are percent&hyphen;encoded&period; The special characters (those not in the allowed character set) are stored as three character escapes that consist of a percent sign (&apos;%%&apos;) followed by a two&hyphen;digit hexadecimal number of the corresponding unescaped character code, which may be part of a UTF&hyphen;8 code point depending on the context&period;

The view refers to the original character buffer and only decodes escaped sequences when needed&period; In particular these operations perform percent&hyphen;decoding automatically without the need to allocate memory&colon;

* Iteration of the string
* Accessing the encoded character buffer
* Comparison to encoded or plain strings

These objects can only be constructed from strings that have a valid percent&hyphen;encoding, otherwise construction fails&period; The caller is responsible for ensuring that the lifetime of the character buffer from which the view is constructed extends unmodified until the view is no longer accessed&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:boost/urls/decode_view/iterator.adoc[`iterator`] 
| An iterator of constant, decoded characters&period;
| xref:boost/urls/decode_view/const_iterator.adoc[`const&lowbar;iterator`] 
| An iterator of constant, decoded characters&period;
| xref:boost/urls/decode_view/const_reference.adoc[`const&lowbar;reference`] 
| The reference type
| xref:boost/urls/decode_view/difference_type.adoc[`difference&lowbar;type`] 
| The signed integer type
| xref:boost/urls/decode_view/reference.adoc[`reference`] 
| The reference type
| xref:boost/urls/decode_view/size_type.adoc[`size&lowbar;type`] 
| The unsigned integer type
| xref:boost/urls/decode_view/value_type.adoc[`value&lowbar;type`] 
| The value type
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:boost/urls/decode_view/2constructor-08.adoc[`decode&lowbar;view`]         [.small]#[constructor]#
| Constructor
| xref:boost/urls/decode_view/back.adoc[`back`] 
| Return the last character
| xref:boost/urls/decode_view/begin.adoc[`begin`] 
| Return an iterator to the beginning
| xref:boost/urls/decode_view/compare-0d.adoc[`compare`] 
| Return the result of comparing to another string
| xref:boost/urls/decode_view/empty.adoc[`empty`] 
| Return true if the string is empty
| xref:boost/urls/decode_view/end.adoc[`end`] 
| Return an iterator to the end
| xref:boost/urls/decode_view/ends_with-08.adoc[`ends&lowbar;with`] 
| Checks if the string ends with the given prefix
| xref:boost/urls/decode_view/find.adoc[`find`] 
| Finds the first occurrence of character in this view
| xref:boost/urls/decode_view/front.adoc[`front`] 
| Return the first character
| xref:boost/urls/decode_view/options.adoc[`options`] 
| Return the decoding options
| xref:boost/urls/decode_view/remove_prefix.adoc[`remove&lowbar;prefix`] 
| Remove the first characters
| xref:boost/urls/decode_view/remove_suffix.adoc[`remove&lowbar;suffix`] 
| Remove the last characters
| xref:boost/urls/decode_view/rfind.adoc[`rfind`] 
| Finds the first occurrence of character in this view
| xref:boost/urls/decode_view/size.adoc[`size`] 
| Return the number of decoded characters
| xref:boost/urls/decode_view/starts_with-04.adoc[`starts&lowbar;with`] 
| Checks if the string begins with the given prefix
|===

== Friends

[cols="1,4"]
|===
|Name|Description

| `xref:boost/urls/operator_lshift-034.adoc[boost::urls::operator&lt;&lt;]`
| Format the string with percent&hyphen;decoding applied to the output stream
| `xref:boost/urls/operator_ge-09c.adoc[boost::urls::operator&gt;&equals;]`
| Compare two decode views for greater than or equal
| `xref:boost/urls/operator_ge-09e.adoc[boost::urls::operator&gt;&equals;]`
| Compare two decode views for greater than or equal
| `xref:boost/urls/operator_ge-06.adoc[boost::urls::operator&gt;&equals;]`
| Compare two decode views for greater than or equal
| `xref:boost/urls/operator_gt-00.adoc[boost::urls::operator&gt;]`
| Compare two decode views for greater than
| `xref:boost/urls/operator_gt-0a.adoc[boost::urls::operator&gt;]`
| Compare two decode views for greater than
| `xref:boost/urls/operator_gt-03.adoc[boost::urls::operator&gt;]`
| Compare two decode views for greater than
| `xref:boost/urls/operator_le-06.adoc[boost::urls::operator&lt;&equals;]`
| Compare two decode views for less than or equal
| `xref:boost/urls/operator_le-0e.adoc[boost::urls::operator&lt;&equals;]`
| Compare two decode views for less than or equal
| `xref:boost/urls/operator_le-00.adoc[boost::urls::operator&lt;&equals;]`
| Compare two decode views for less than or equal
| `xref:boost/urls/operator_lt-03.adoc[boost::urls::operator&lt;]`
| Compare two decode views for less than
| `xref:boost/urls/operator_lt-047.adoc[boost::urls::operator&lt;]`
| Compare two decode views for less than
| `xref:boost/urls/operator_lt-051.adoc[boost::urls::operator&lt;]`
| Compare two decode views for less than
| `xref:boost/urls/operator_not_eq-0b.adoc[boost::urls::operator!&equals;]`
| Compare two decode views for inequality
| `xref:boost/urls/operator_not_eq-06.adoc[boost::urls::operator!&equals;]`
| Compare two decode views for inequality
| `xref:boost/urls/operator_not_eq-08.adoc[boost::urls::operator!&equals;]`
| Compare two decode views for inequality
| `xref:boost/urls/operator_eq-02.adoc[boost::urls::operator&equals;&equals;]`
| Compare two decode views for equality
| `xref:boost/urls/operator_eq-090.adoc[boost::urls::operator&equals;&equals;]`
| Compare two decode views for equality
| `xref:boost/urls/operator_eq-091.adoc[boost::urls::operator&equals;&equals;]`
| Compare two decode views for equality
|===


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