Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
basic_static_string::insert (2 of 15 overloads)

Insert a string.

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

Inserts the null-terminated character string pointed to by s of length count at the position index where count is traits_type::length(s).

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.

Exceptions

Type

Thrown On

std::length_error

size() + count > max_size()

std::out_of_range

index > size()


PrevUpHomeNext