std::basic_string::data
Aus 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; | ||
Liefert Zeiger auf das zugrunde liegende Array dient als Zeichen Speicher .
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.
Wenn
empty()
kehrt false, ist der Zeiger, so dass der Bereich [data(); data() + size())
gültig ist und die Werte darin zu den Werten in der Zeichenfolge gespeichert sind. Wenn empty()
kehrt true, ist der Zeiger ein nicht-Null-Zeiger nicht zu dereferenziert. (bis 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. (bis 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.
Der Zeiger ist derart, dass der Bereich
[data(); data() + size()]
gültig ist und die Werte darin zu den Werten in der Zeichenfolge (einschließlich des zusätzlichen Nullzeichen) gespeichert entsprechen, auch wenn empty()
kehrt true. (seit 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. (seit 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.
Inhaltsverzeichnis |
[Bearbeiten]Notes
Schriftlich an den Zeichen-Array durch
data
zugegriffen wird undefinierten Verhalten .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.
Der Zeiger von
data()
erhalten sollte nicht als gültig angesehen werden, nachdem alle nicht-const-Betrieb auf der Saite .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.
Da C + 11, und
data()
c_str()
die gleiche Funktion .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.
[Bearbeiten]Parameter
(None)
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.
[Bearbeiten]Rückgabewert
Pointer auf die zugrunde liegende Charakter Speicher, so dass data()[i]== operator[](i) für jeden
i
in [0, size())
. (bis C + +11)Original:
Pointer to the underlying character storage such that data()[i]== operator[](i) for every
i
in [0, size())
. (bis 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.
Pointer auf die zugrunde liegende Charakter Speicher, so dass data()+ i ==&operator[](i) für jeden
i
in [0, size()]
. (seit C++11)Original:
Pointer to the underlying character storage such that data()+ i ==&operator[](i) for every
i
in [0, size()]
. (seit 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.
[Bearbeiten]Komplexität
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.
[Bearbeiten]Ausnahmen
[Bearbeiten]Siehe auch
(C++11) | greift auf das erste Zeichen Original: accesses the first character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (öffentliche Elementfunktion) |
(C++11) | greift das letzte Zeichen Original: accesses the last character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (öffentliche Elementfunktion) |
gibt eine nicht-modifizierbare Standard C Zeichenarray Version der Zeichenfolge Original: returns a non-modifiable standard C character array version of the string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (öffentliche Elementfunktion) |