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 ebf92b6d34.
PrevUpHomeNext

basic_static_string::copy

Copy a substring to another string.

Synopsis
constexpr size_type
copy(
    pointer dest,
    size_type count,
    size_type pos = 0) const;
Description

Copies std::min(count, size() - pos) characters starting at index pos to the string pointed to by dest.

Remarks

The resulting string is not null terminated.

Return Value

The number of characters copied.

Parameters

Name

Description

count

The number of characters to copy.

dest

The string to copy to.

pos

The index to begin copying from. The default argument for this parameter is 0.

Exceptions

Type

Thrown On

std::out_of_range

pos > max_size()


PrevUpHomeNext