std::basic_string::resize
提供: cppreference.com
< cpp | string | basic string
![]() | このページは、Google 翻訳を使って英語版から機械翻訳されました。 翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
void resize( size_type count ); | (1) | |
void resize( size_type count, CharT ch ); | (2) | |
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.
現在のサイズが
count
未満であれば、余計な文字が付加されます.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.
現在のサイズが
count
より大きい場合、文字列は、その最初のcount
要素に還元される.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.
最初のバージョンはCharT()に新しい文字を初期化し、2番目のバージョンは、
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.
目次 |
[編集]パラメータ
count | - | 文字列の新しいサイズ 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 | - | で新しい文字を初期化する文字 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. |
[編集]値を返します
(なし)
[編集]複雑性
文字列の大きさに比例
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.
[編集]参照
文字数を返します (パブリックメンバ関数) |