:relfileprefix: ../../../ [#boost-urls-segments_base-back] = xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/segments_base.adoc[pass:[segments_base]]::back Return the last segment == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:std.adoc[std]::string back() const noexcept; ---- == Description === Preconditions [,cpp] ---- this->empty() == false ---- === Example [,cpp] ---- assert( url_view( "/path/to/file.txt" ).segments().back() == "file.txt" ); ---- === Preconditions [,cpp] ---- this->empty() == false ---- === Effects [,cpp] ---- return *--end(); ---- === Complexity Linear in `this->back().size()`. === Exception Safety Calls to allocate may throw.