std::basic_string::operator[]
De 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. |
reference operator[]( size_type pos ); | ||
const_reference operator[]( size_type pos )const; | ||
Renvoie une référence au caractère à
pos
emplacement spécifié. Aucune vérification de limites est effectuée .Original:
Returns a reference to the character at specified location
pos
. No bounds checking is performed.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.
If pos==size(),
- La version const retourne une référence au caractère avec la valeur CharT() (le caractère nul). (avant C++11)Original:The const version returns a reference to the character with value CharT() (the null character). (avant C++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Les deux versions renvoie une référence au caractère avec la valeur CharT() (le caractère nul). Modification du caractère nul grâce à des résultats de référence non-const à un comportement indéfini. (depuis C++11)Original:Both versions returns a reference to the character with value CharT() (the null character). Modifying the null character through non-const reference results in undefined behavior. (depuis C++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Sommaire |
[modifier]Paramètres
pos | - | position du caractère à retourner Original: position of the character to return The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifier]Retourne la valeur
référence au caractère requis
Original:
reference to the requested 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.
[modifier]Complexité
Constante
Original:
Constant
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.
[modifier]Voir aussi
accède au caractère spécifié avec contrôle de bornes (fonction membre publique) |