std::basic_string::copy
提供: cppreference.com
< cpp | string | basic string
![]() |
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. |
size_type copy( CharT* dest, size_type count, |
||
[pos, pos+count)
が指す文字列に部分文字列dest
をコピーします。要求された部分文字列が文字列の終端を過ぎ、またはcount == nposあれば継続した場合、コピーされた部分文字列は、[pos, size())
です。結果の文字列はNULLで終わるではない.Original:
Copies a substring
[pos, pos+count)
to character string pointed to by dest
. If the requested substring lasts past the end of the string, or if count == npos, the copied substring is [pos, size())
. The resulting character string is not null-terminated.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.
pos >= size()場合、std::out_of_rangeがスローされます.
Original:
If pos >= size(), std::out_of_range is thrown.
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.
目次 |
[編集] パラメータ
dest | - | 先の文字列へのポインタ
Original: pointer to the destination character string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
pos | - | 搭載した最初の文字の位置
Original: position of the first character to include The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
count | - | 部分文字列の長さ
Original: length of the substring The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[編集] 値を返します
文字数がコピーされます
Original:
number of characters copied
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.
[編集] 例外
std::out_of_range if pos >= size().
[編集] 複雑
count
の線形Original:
linear in
count
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.
[編集] 例
This section is incomplete Reason: no example |
[編集] も参照してください
部分文字列を返します Original: returns a substring The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) |