Boost.URL

    • Quick Look
    • URLs
      • Parsing
      • Containers
      • Segments
      • Params
      • Normalization
      • String Token
      • Percent Encoding
      • Formatting
    • Customization
      • Parse Rules
      • Character Sets
      • Compound Rules
      • Ranges
      • RFC 3986
    • Examples
      • QR Code
      • Finicky
      • mailto URLs
      • Magnet Link
      • File Router
      • Router
      • Sanitizing URLs
    • Reference
      • Concepts
        • CharSet
        • Rule
        • StringToken
      • Help Card
  • boost::urls::segments_base::back

boost::urls::segments_base::back

Return the last segment

Synopsis

Declared in <include/boost/url/segments_base.hpp>

std::string
back() const noexcept;

Description

this->empty() == false
assert( url_view( "/path/to/file.txt" ).segments().back() == "file.txt" );
this->empty() == false
return *--end();

Linear in `this‐>back().size()`.

Calls to allocate may throw.

Created with MrDocs