[#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#L72[boost&sol;url&sol;decode&lowbar;view&period;hpp]&gt;`

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

== Types

[cols=2]
|===
| Name | Description 

| 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/iterator.adoc[`iterator`] 
| An iterator of constant, decoded characters&period;

| 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=2]
|===
| Name | Description 

| 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.adoc[`compare`] 
| Return the result of comparing to another string


| xref:boost/urls/decode_view/2constructor.adoc[`decode&lowbar;view`]         [.small]#[constructor]#
| Constructor


| 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.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.adoc[`starts&lowbar;with`] 
| Checks if the string begins with the given prefix


|===
== Friends

[cols=2]
|===
| Name | Description 

| xref:boost/urls/decode_view/08friend-0f.adoc[`operator!&equals;`] 
| Compare two decode views for inequality

| xref:boost/urls/decode_view/08friend-09a.adoc[`operator!&equals;`] 
| Compare two decode views for inequality

| xref:boost/urls/decode_view/08friend-01.adoc[`operator!&equals;`] 
| Compare two decode views for inequality

| xref:boost/urls/decode_view/08friend-09c.adoc[`operator&lt;`] 
| Compare two decode views for less than

| xref:boost/urls/decode_view/08friend-054.adoc[`operator&lt;`] 
| Compare two decode views for less than

| xref:boost/urls/decode_view/08friend-047.adoc[`operator&lt;`] 
| Compare two decode views for less than

| xref:boost/urls/decode_view/08friend-08.adoc[`operator&lt;&lt;`] 
| Format the string with percent&hyphen;decoding applied to the output stream

| xref:boost/urls/decode_view/08friend-04a.adoc[`operator&lt;&equals;`] 
| Compare two decode views for less than or equal

| xref:boost/urls/decode_view/08friend-0b.adoc[`operator&lt;&equals;`] 
| Compare two decode views for less than or equal

| xref:boost/urls/decode_view/08friend-0c.adoc[`operator&lt;&equals;`] 
| Compare two decode views for less than or equal

| xref:boost/urls/decode_view/08friend-05f.adoc[`operator&equals;&equals;`] 
| Compare two decode views for equality

| xref:boost/urls/decode_view/08friend-097.adoc[`operator&equals;&equals;`] 
| Compare two decode views for equality

| xref:boost/urls/decode_view/08friend-0e8.adoc[`operator&equals;&equals;`] 
| Compare two decode views for equality

| xref:boost/urls/decode_view/08friend-02.adoc[`operator&gt;`] 
| Compare two decode views for greater than

| xref:boost/urls/decode_view/08friend-049.adoc[`operator&gt;`] 
| Compare two decode views for greater than

| xref:boost/urls/decode_view/08friend-0ec.adoc[`operator&gt;`] 
| Compare two decode views for greater than

| xref:boost/urls/decode_view/08friend-0d.adoc[`operator&gt;&equals;`] 
| Compare two decode views for greater than or equal

| xref:boost/urls/decode_view/08friend-0aa1.adoc[`operator&gt;&equals;`] 
| Compare two decode views for greater than or equal

| xref:boost/urls/decode_view/08friend-0aa2.adoc[`operator&gt;&equals;`] 
| Compare two decode views for greater than or equal

|===



== 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;





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