string::resize
Change the size of the string.
Synopsis
void
resize(
std::size_t count); (1)
void
resize(
std::size_t count,
char ch); (2)
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 |
---|---|
|
The size to resize the string to. |
|
The characters to append if the size increases. |
Exceptions
Type | Thrown On |
---|---|
|
|