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 develop branch, built from commit 65ab21cc6f.
PrevUpHomeNext
basic_static_string::insert (3 of 11 overloads)

Insert into the string.

Synopsis
constexpr basic_static_string&
insert(
    size_type index,
    const_pointer s,
    size_type count);
Description

Inserts count characters of the string pointed to by s at the position index.

Exception Safety

Strong guarantee.

Remarks

All references, pointers, or iterators referring to contained elements are invalidated. Any past-the-end iterators are also invalidated.

Return Value

*this

Parameters

Name

Description

index

The index to insert at.

s

The string to insert.

count

The length of the string to insert.

Exceptions

Type

Thrown On

std::length_error

size() + count > max_size()

std::out_of_range

index > size()


PrevUpHomeNext