[#boost-urls-segments_encoded_base-size]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_encoded_base.adoc[segments&lowbar;encoded&lowbar;base]::size
:relfileprefix: ../../../
:mrdocs:

Return the number of segments

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::size&lowbar;t
size() const noexcept;
----

== Example

[,cpp]
----
assert( url_view( "/path/to/file.txt" ).encoded_segments().size() == 3 );
----
== Complexity

Constant&period;

== Exception Safety

Throws nothing&period;

== Return Value

The number of segments&period;


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