Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
static_url_base::fragment

(Inherited from url_view_base)

Return the fragment.

Synopsis
template<
    class StringToken = string_token::return_string>
StringToken::result_type
fragment(
    StringToken&& token = {}) const;
Description

This function returns the fragment as a string. Any percent-escapes in the string are decoded first.

Example
assert( url_view( "http://www.example.com/index.htm#a%2D1" ).fragment() == "a-1" );
Complexity

Linear in this->fragment().size().

Exception Safety

Calls to allocate may throw.

BNF
fragment        = *( pchar / "/" / "?" )

fragment-part   = [ "#" fragment ]
Specification
See Also

encoded_fragment, has_fragment.


PrevUpHomeNext