std::basic_string::copy
Da cppreference.com.
< cpp | string | basic string
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
size_type copy( CharT* dest, size_type count, | ||
Copia un
[pos, pos+count)
sottostringa di stringa di caratteri puntata da dest
. Se la sottostringa richiesto dura oltre la fine della stringa, o se count == npos, la sottostringa copiato è [pos, size())
. La stringa di caratteri risultante non è con terminazione 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.
Se pos >= size(), std::out_of_range viene gettato.
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.
Indice |
[modifica]Parametri
dest | - | puntatore alla stringa di caratteri di destinazione 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 | - | posizione del primo carattere da includere 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 | - | lunghezza della sottostringa 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. |
[modifica]Valore di ritorno
numero di caratteri copiati
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.
[modifica]Eccezioni
std::out_of_range if pos >= size().
[modifica]Complessità
lineare in
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.
[modifica]Esempio
This section is incomplete Reason: no example |
[modifica]Vedi anche
restituisce una sottostringa (metodo pubblico) |