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 579430ad1f.
PrevUpHomeNext
string::resize (2 of 2 overloads)

Change the size of the string.

Synopsis
void
resize(
    std::size_t count,
    char ch);
Description

Resizes the string to contain count characters. If count > size(), copies of ch are appended. Otherwise, size() is reduced to count.

Parameters

Name

Description

count

The size to resize the string to.

ch

The characters to append if the size increases.

Exceptions

Type

Thrown On

boost::system::system_error

count > max_size().


PrevUpHomeNext