std::basic_string::data
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. |
const CharT* data() const; |
||
Renvoie un pointeur vers le tableau sous-jacent servant de stockage caractère .
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 stockées dans la chaîne. Si empty()
retours true, le pointeur est un pointeur non nul qui ne devrait pas être déréférencé. (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 stockées dans la chaîne (y compris le caractère nul supplémentaire), même 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.
Sommaire |
[modifier] Notes
L'écriture dans le tableau de caractères accessibles via
data
est un comportement indéfini .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 considérée comme valide après toute opération non-const sur la chaîne .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 même 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.
[modifier] Paramètres
(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.
[modifier] Retourne la valeur
Pointeur vers le stockage caractère 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 caractère 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.
[modifier] 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.
[modifier] Exceptions
[modifier] Voir aussi
(C++11) |
accède au premier caractère (fonction membre publique) |
(C++11) |
accède au dernier caractère (fonction membre publique) |
retourne la chaine de caractère sous sa forme standard C non-modifiable (fonction membre publique) |