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; |
||
Retorna ponteiro para a matriz subjacente que serve de armazenamento de caracteres.
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.
Se
empty() false retornos, o ponteiro tal que o intervalo vlido [data(); data() + size()) e os valores em que correspondem aos valores armazenados na cadeia. Se empty() retornos true, o ponteiro um ponteiro no-nula de que no deve ser dereferenced. (at 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. (at 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.
O ponteiro tal que o intervalo vlido
[data(); data() + size()] e os valores em que correspondem aos valores armazenados na cadeia (incluindo o carcter nulo adicional), mesmo quando empty() retornos true. (desde 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. (desde 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.
Notas
Escrevendo para a matriz de caracteres acessado atravs
data um comportamento indefinido.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.
O ponteiro obtido
data() no devem ser consideradas vlidas aps uma operao no-const na cadeia.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.
Como C + +11,
data() e c_str() executar a mesma funo.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.
Parmetros
(Nenhum)
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.
Valor de retorno
Ponteiro para o armazenamento subjacente
data()[i] == operator[](i) carcter tal que para cada i em [0, size()). (at C++11)Original:
Pointer to the underlying character storage such that
data()[i] == operator[](i) for every i in [0, size()). (at 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.
Ponteiro para o armazenamento subjacente
data() + i == &operator[](i) carcter tal que para cada i em [0, size()]. (desde C++11)Original:
Pointer to the underlying character storage such that
data() + i == &operator[](i) for every i in [0, size()]. (desde 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.
Complexidade
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.
Excees
Veja tambm
(C++11) |
acessa o primeiro caractere 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. (funo pblica membro) |
(C++11) |
acessa o ltimo caractere 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. (funo pblica membro) |
retorna um no-modificveis padro C verso matriz de caracteres da cadeia 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. (funo pblica membro) | |