std::basic_string::copy
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> size_type copy( CharT* dest, size_type count, size_type pos = 0); |
||
Copie une chane
[pos, pos+count) la chane de caractres pointe par dest. Si la sous-chane demande dure-del de la fin de la chane, ou si count == npos, la sous-chane est copie [pos, size()). La chane de caractres rsultante n'est pas termine par 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.
Si
pos >= size(), std::out_of_range est lance . 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.
Paramtres
| dest | - | pointeur vers la chane de caractres cible
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 | - | position du premier caractre inclure
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 | - | longueur de la chane
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. |
Retourne la valeur
nombre de caractres copis
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.
Exceptions
std::out_of_range if pos >= size().
Complexit
linaire dans
countOriginal:
linear in
countThe 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.
Exemple
| This section is incomplete Reason: no example |
Voir aussi
renvoie une sous-chane 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. (fonction membre publique) | |