[#boost-urls-segments_encoded_base-size] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_encoded_base.adoc[segments_encoded_base]::size :relfileprefix: ../../../ :mrdocs: Return the number of segments == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/segments_encoded_base.hpp#L235[boost/url/segments_encoded_base.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::size_t size() const noexcept; ---- == Description === Example [,cpp] ---- assert( url_view( "/path/to/file.txt" ).encoded_segments().size() == 3 ); ---- === Complexity Constant. === Exception Safety Throws nothing. [.small]#Created with https://www.mrdocs.com[MrDocs]#