boost::urls::static_url::remove_scheme :: Boost Libraries Documentation

# boost::urls::static_url::remove_scheme

Remove the scheme

## Synopsis

Declared in `<boost/url/static_url.hpp>`

    static_url&
    remove_scheme();

## Description

This function removes the scheme if it is present.

## Example

    assert( url("http://www.example.com/index.htm" ).remove_scheme().buffer() == "//www.example.com/index.htm" );

## Postconditions

    this->has_scheme() == false && this->scheme_id() == scheme::none

## Complexity

Linear in `this‐>size()`.

## Exception Safety

Throws nothing.

## BNF

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

## Specification

- 3.1. Scheme (rfc3986)

## Return Value

`*this`

## See Also

`set_scheme`.

Created with MrDocs