resize [C++ Reference]
Keywords: string,resize
Date: 2010-03-09T14:33:59-0800

[[resize]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## resize

Syntax:

        #include <string>
        void resize( size_type size, char val = char() );

The function resize() changes the size of the string to size. If val is specified then any newly-created elements will be initialized to have a value of val. This function runs in linear time.

Related Topics: capacity, size

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •