cpp/string/basic string/resize: Unterschied zwischen den Versionen
Aus cppreference.com
< cpp | string | basic string
(Translated from the English version using Google Translate) |
P12 (Diskussion | Beiträge) K (1 Version: Translate from the English version) |
Version vom 25. Oktober 2012, 11:36 Uhr
void resize( size_type count ); |
(1) | |
void resize( size_type count, CharT ch ); |
(2) | |
Ändert die Zeichenfolge
count
Zeichen enthalten .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.
Wenn die aktuelle Größe kleiner als
count
werden zusätzliche Zeichen angehängt .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.
Wenn die aktuelle Größe ist größer als
count
, wird die Zeichenfolge in der ersten count
Elemente reduziert .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.
Die erste Version initialisiert neue Zeichen CharT(), initialisiert die zweite Version neue Charaktere
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.
Inhaltsverzeichnis |
Parameter
count | - | neue Größe des Strings
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 | - | Charakter, um die neuen Zeichen mit initialisieren
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. |
Rückgabewert
(None)
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.
Komplexität
linear in der Größe der Zeichenfolge
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.