Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 064f557086.
PrevUpHomeNext
string::subview (1 of 2 overloads)

Return a view.

Synopsis
string_view
subview(
    std::size_t pos,
    std::size_t count = npos) const;
Description

Returns a view of a substring.

Exception Safety

Strong guarantee.

Return Value

this->subview().substr(pos, count)

Parameters

Name

Description

pos

The index to being the substring at. The default argument for this parameter is 0.

count

The length of the substring. The default argument for this parameter is npos.

Exceptions

Type

Thrown On

boost::system::system_error

pos > size().


PrevUpHomeNext