:relfileprefix: ../../../
[#C8133C8D467B954873B4A52B28030256517F2523]

= Function segments_base::size

pass:v,q[Return the number of segments]


== Synopsis

Declared in header `</boost/url/segments_base.hpp#L209[boost/url/segments_base.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
size_t
size() const noexcept;
----

== Description


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

=== Complexity
pass:v,q[Constant.]

=== Exception Safety
pass:v,q[Throws nothing.]



== Return Value

* `size_t` 




