std::basic_string::erase
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. |
basic_string& erase( size_type index = 0, size_type count = npos ); |
(1) | |
iterator erase( iterator position ); iterator erase( const_iterator position ); |
(2) | (até C++11) (desde C++11) |
iterator erase( iterator first, iterator last ); iterator erase( const_iterator first, const_iterator last ); |
(3) | (até C++11) (desde C++11) |
Remove caracteres especificados a partir da cadeia.
Original:
Removes specified characters from 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.
1)
Remove caracteres
count
partir de index
.Original:
Removes
count
characters starting at index
.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.
2)
Remove o caractere na
position
.Original:
Removes the character at
position
.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.
3)
Remove o personagem no
[first; last)
gama.Original:
Removes the character in the range
[first; last)
.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
index | - | primeiro caractere de remover
Original: first character to remove The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
count | - | número de caracteres a serem removidas
Original: number of characters to remove The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
position | - | iterador para o personagem de remover
Original: iterator to the character to remove The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
first, last | - | faixa dos personagens de remover
Original: range of the characters to remove 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
1) *this
2-3)
iterador após o último caractere removido.
Original:
iterator following the last removed character.
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
1) std::out_of_range if index > size().
2-3)
(Nenhum)
Original:
(none)
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] Veja também
apaga o conteúdo Original: clears the contents 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) |