◐ Shell
clean mode source ↗

std::basic_string::resize — cppreference.com

De cppreference.com

<metanoindex/>

<tbody> </tbody>

void resize( size_type count );

(1)

void resize( size_type count, CharT ch );

(2)

Redimensionne la chaîne contient des caractères 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.

Si la taille actuelle est inférieure à count, des caractères supplémentaires sont ajoutés .

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.

Si la taille actuelle est supérieure à count, la chaîne est réduite à ses éléments 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.

La première version initialise de nouveaux caractères à CharT(), la deuxième version initialise de nouveaux caractères à 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.

Paramètres

count -

nouvelle taille de la chaîne

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 -

caractère pour initialiser les nouveaux caractères 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.

Complexité

linéaire dans la taille de la chaîne

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.

Voir aussi