Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
string::resize (1 of 2 overloads)

Change the size of the string.

Synopsis
void
resize(
    std::size_t count);
Description

Resizes the string to contain count characters. If count > size(), characters with the value 0 are appended. Otherwise, size() is reduced to count.

Parameters

Name

Description

count

The size to resize the string to.

Exceptions

Type

Thrown On

std::out_of_range

count > max_size()


PrevUpHomeNext