std::basic_string::copy
Da 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, |
||
Copia um
[pos, pos+count)
caracteres para a cadeia de caracteres apontada por dest
. Se a substring solicitado dura após o final da cadeia, ou se count == npos, a substring copiado é [pos, size())
. A cadeia de caracteres resultante não é nulo terminada.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 é jogado.
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.
Índice |
[editar] Parâmetros
dest | - | ponteiro para a cadeia de caracteres de destino
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 | - | posição do primeiro caractere a incluir
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 | - | comprimento da substring
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. |
[editar] Valor de retorno
número de caracteres copiados
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.
[editar] Exceções
std::out_of_range if pos >= size().
[editar] Complexidade
linear em
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.
[editar] Exemplo
Esta seção está incompleta Motivo: sem exemplo |
[editar] Veja também
retorna uma substring 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. (função pública membro) |