: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"] ---- std::string back() const noexcept; ---- === Description [,cpp] ---- this->empty() == false ---- [,cpp] ---- assert( url_view( "/path/to/file.txt" ).segments().back() == "file.txt" ); ---- [,cpp] ---- this->empty() == false ---- [,cpp] ---- return *--end(); ---- === Linear in `this->back().size()`. === Calls to allocate may throw.