◐ Shell
clean mode source ↗

std::basic_string::erase — cppreference.com

De cppreference.com

<metanoindex/>

<tbody> </tbody>

basic_string& erase( size_type index = 0, size_type count = npos );

(1)

iterator erase( iterator position ); iterator erase( const_iterator position );

(2) (avant C++11)
(depuis C++11)

iterator erase( iterator first, iterator last ); iterator erase( const_iterator first, const_iterator last );

(3) (avant C++11)
(depuis C++11)

Supprime les caractères spécifiés de la chaîne .

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.

1)

Supprime les caractères 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.

2)

Supprime le caractère à 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.

3)

Supprime le caractère à la plage .. [first; last)

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.

Paramètres

index -

premier caractère à supprimer

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 -

nombre de caractères à supprimer

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 -

itérateur sur le caractère à supprimer

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 -

plage de caractères à supprimer

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.

Retourne la valeur

1) *this

2-3)

itérateur après le dernier caractère enlevé .

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.

Exceptions

1) std::out_of_range if index > size().

2-3)

(Aucun)

Original:

(none)

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Voir aussi

efface le contenu
(fonction membre publique) [edit]