| Home | Libraries | People | FAQ | More

##### url_base::has_fragment

(Inherited from `url_view_base`)

Return true if a fragment is present.

###### Synopsis

    bool
    has_fragment() const;

###### Description

This function returns true if the url contains a fragment. An empty fragment is distinct from no fragment.

###### Example

    assert( url_view( "http://www.example.com/index.htm#anchor" ).has_fragment() );

###### Complexity

Constant.

###### Exception Safety

Throws nothing.

###### BNF

    URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

    relative-ref  = relative-part [ "?" query ] [ "#" fragment ]

###### Specification

- 3.5. Fragment (rfc3986)

###### See Also

`encoded_fragment`, `fragment`.