std::basic_string::resize
De cppreference.com
<metanoindex/>
<tbody> </tbody> void resize( size_type count ); |
(1) | |
void resize( size_type count, CharT ch ); |
(2) | |
Redimensiona a cadeia para conter caracteres
count.Original:
Resizes the string to contain
count characters.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Se o tamanho atual é menor do que
count, caracteres adicionais são anexados.Original:
If the current size is less than
count, additional characters are appended.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Se o tamanho atual é maior do que
count, a cadeia é reduzido aos seus elementos count primeiro.Original:
If the current size is greater than
count, the string is reduced to its first count elements.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
A primeira versão inicializa novos personagens para
CharT(), a segunda versão inicializa novos personagens para ch.Original:
The first version initializes new characters to
CharT(), the second version initializes new characters to ch.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Parâmetros
| count | - | novo tamanho da corda
Original: new size of the string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| ch | - | personagem para inicializar os novos personagens com
Original: character to initialize the new characters with The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Valor de retorno
(Nenhum)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Complexidade
linear no tamanho da cadeia
Original:
linear in the size of the string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
