std::basic_string::data
De cppreference.com
[] |
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. |
<metanoindex/>
<tbody> </tbody> const CharT* data() const; |
||
Renvoie un pointeur vers le tableau sous-jacent servant de stockage caractre .
Original:
Returns pointer to the underlying array serving as character storage.
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.
Si
empty() rendements false, le pointeur est telle que la plage de [data(); data() + size()) est valide et les valeurs qui y correspondent aux valeurs stockes dans la chane. Si empty() retours true, le pointeur est un pointeur non nul qui ne devrait pas tre drfrenc. (avant C++11)Original:
If
empty() returns false, the pointer is such that the range [data(); data() + size()) is valid and the values in it correspond to the values stored in the string. If empty() returns true, the pointer is a non-null pointer that should not be dereferenced. (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.
You can help to correct and verify the translation. Click here for instructions.
Le pointeur est telle que la plage de
[data(); data() + size()] est valide et les valeurs qui y correspondent aux valeurs stockes dans la chane (y compris le caractre nul supplmentaire), mme lorsque le rendement empty() true. (depuis C++11)Original:
The pointer is such that the range
[data(); data() + size()] is valid and the values in it correspond to the values stored in the string (including the additional null character) even when empty() returns true. (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.
You can help to correct and verify the translation. Click here for instructions.
Notes
L'criture dans le tableau de caractres accessibles via
data est un comportement indfini .Original:
Writing to the character array accessed through
data is undefined behavior.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.
Le pointeur obtenu partir
data() ne doit pas tre considre comme valide aprs toute opration non-const sur la chane .Original:
The pointer obtained from
data() should not be considered valid after any non-const operation on 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.
Depuis C++11,
data() et c_str() remplissent la mme fonction .Original:
Since C++11,
data() and c_str() perform the same function.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.
Paramtres
(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.
You can help to correct and verify the translation. Click here for instructions.
Retourne la valeur
Pointeur vers le stockage caractre sous-jacent tel que
data()[i] == operator[](i) pour chaque i dans [0, size()). (avant C++11)Original:
Pointer to the underlying character storage such that
data()[i] == operator[](i) for every i in [0, size()). (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.
You can help to correct and verify the translation. Click here for instructions.
Pointeur vers le stockage caractre sous-jacent tel que
data() + i == &operator[](i) pour chaque i dans [0, size()]. (depuis C++11)Original:
Pointer to the underlying character storage such that
data() + i == &operator[](i) for every i in [0, size()]. (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.
You can help to correct and verify the translation. Click here for instructions.
Complexit
Constant .
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.
Exceptions
Voir aussi
(C++11) |
accde au premier caractre (fonction membre publique) |
(C++11) |
accde au dernier caractre (fonction membre publique) |
| retourne la chaine de caractre sous sa forme standard C non-modifiable (fonction membre publique) | |