std::basic_string::resize
De cppreference.com
[] |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody> void resize( size_type count ); |
(1) | |
void resize( size_type count, CharT ch ); |
(2) | |
Redimensionne la chane contient des caractres
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.
Si la taille actuelle est infrieure
count, des caractres supplmentaires sont ajouts .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.
Si la taille actuelle est suprieure
count, la chane est rduite ses lments count premiers secours .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.
La premire version initialise de nouveaux caractres
CharT(), la deuxime version initialise de nouveaux caractres 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.
Paramtres
| count | - | nouvelle taille de la chane
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 | - | caractre pour initialiser les nouveaux caractres avec
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. |
Retourne la valeur
(Aucun)
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.
Complexit
linaire dans la taille de la chane
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.
Voir aussi
| returns the number of characters (fonction membre publique) | |