[#boost-urls-segments_encoded_view]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::segments&lowbar;encoded&lowbar;view
:relfileprefix: ../../
:mrdocs:

Non&hyphen;owning encoded path segment view

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class segments&lowbar;encoded&lowbar;view
    : public xref:boost/urls/segments_encoded_base.adoc[segments&lowbar;encoded&lowbar;base]
----

== Description

Exposes the raw percent&hyphen;encoded segments of a URL path as a read&hyphen;only bidirectional range&period; The view references the original buffer, so callers must keep that storage alive while iterating&period;

== Example

[,cpp]
----
url_view u( "/path/to/file.txt" );

segments_encoded_view ps = u.encoded_segments();

assert( ps.buffer().data() == u.buffer().data() );
----
Elements are returned as encoded strings, preserving escape sequences for callers that need the exact byte representation&period;

== Iterator Invalidation

Changes to the underlying character buffer can invalidate iterators which reference it&period;

== Base Classes

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

| `xref:boost/urls/segments_encoded_base.adoc[segments&lowbar;encoded&lowbar;base]`
| Percent&hyphen;encoded path segment helper base
|===

== Types

[cols="1,4"]
|===
| Name| Description
| xref:boost/urls/segments_encoded_view/iterator.adoc[`iterator`] 
| A Bidirectional iterator to a path segment
| xref:boost/urls/segments_encoded_base/const_iterator.adoc[`const&lowbar;iterator`] 
| A Bidirectional iterator to a path segment
| xref:boost/urls/segments_encoded_base/const_reference.adoc[`const&lowbar;reference`] 
| The reference type
| xref:boost/urls/segments_encoded_base/difference_type.adoc[`difference&lowbar;type`] 
| A signed integer type used to represent differences&period;
| xref:boost/urls/segments_encoded_base/reference.adoc[`reference`] 
| The reference type
| xref:boost/urls/segments_encoded_base/size_type.adoc[`size&lowbar;type`] 
| An unsigned integer type used to represent size&period;
| xref:boost/urls/segments_encoded_base/value_type.adoc[`value&lowbar;type`] 
| The value type
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:boost/urls/segments_encoded_view/2constructor-0b1.adoc[`segments&lowbar;encoded&lowbar;view`]         [.small]#[constructor]#
| Constructor
| xref:boost/urls/segments_encoded_view/operator_assign.adoc[`operator&equals;`] 
| Assignment
| xref:boost/urls/segments_encoded_base/back.adoc[`back`] 
| Return the last segment
| xref:boost/urls/segments_encoded_base/begin.adoc[`begin`] 
| Return an iterator to the beginning
| xref:boost/urls/segments_encoded_base/buffer.adoc[`buffer`] 
| Return the referenced character buffer&period;
| xref:boost/urls/segments_encoded_base/empty.adoc[`empty`] 
| Return true if there are no segments
| xref:boost/urls/segments_encoded_base/end.adoc[`end`] 
| Return an iterator to the end
| xref:boost/urls/segments_encoded_base/front.adoc[`front`] 
| Return the first segment
| xref:boost/urls/segments_encoded_base/is_absolute.adoc[`is&lowbar;absolute`] 
| Returns true if this references an absolute path&period;
| xref:boost/urls/segments_encoded_base/size.adoc[`size`] 
| Return the number of segments
| xref:boost/urls/segments_encoded_view/2conversion.adoc[`operator segments&lowbar;view`] 
| Conversion
|===

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:boost/urls/segments_encoded_base/max_size.adoc[`max&lowbar;size`] 
| Return the maximum number of characters possible
|===

== Friends

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

| `xref:boost/urls/parse_path.adoc[boost::urls::parse&lowbar;path]`
| Parse a string and return an encoded segment view
| `xref:boost/urls/segments_encoded_ref.adoc[boost::urls::segments&lowbar;encoded&lowbar;ref]`
| Mutable encoded path segment proxy
| `xref:boost/urls/url_view_base.adoc[boost::urls::url&lowbar;view&lowbar;base]`
| Common functionality for containers
|===

== See Also

xref:boost/urls/segments_view.adoc[`segments&lowbar;view`], xref:boost/urls/segments_encoded_ref.adoc[`segments&lowbar;encoded&lowbar;ref`], xref:boost/urls/segments_ref.adoc[`segments&lowbar;ref`]&period;


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