Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

basic_static_string::subview

Return a view of a substring.

Synopsis
BOOST_STATIC_STRING_CPP14_CONSTEXPR string_view_type
subview(
    size_type pos = 0,
    size_type count = npos) const;
Description

Returns a view of a substring.

Exception Safety

Strong guarantee.

Return Value

A string_view_type object referring to [data() + pos, std::min(count, size() - pos)).

Parameters

Name

Description

pos

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

count

The length of the substring. The default arugment for this parameter is basic_static_string::npos.

Exceptions

Type

Thrown On

std::out_of_range

pos > size()


PrevUpHomeNext