std::basic_string::operator[]
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> reference operator[]( size_type pos ); |
||
const_reference operator[]( size_type pos ) const; |
||
Retorna uma referncia ao personagem de
pos local especificado. Nenhuma verificao de limites realizado.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(),
- A verso const retorna uma referncia para o personagem com valor
CharT()(o caractere nulo). (at C++11)Original:The const version returns a reference to the character with valueCharT()(the null character). (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. - Ambas as verses retorna uma referncia para o personagem com valor
CharT()(o caractere nulo). Modificando o caractere nulo atravs de resultados no-const referncia em comportamento indefinido. (desde C++11)Original:Both versions returns a reference to the character with valueCharT()(the null character). Modifying the null character through non-const reference results in undefined behavior. (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.
Parmetros
| pos | - | posio do personagem para voltar
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. |
Valor de retorno
referncia ao personagem solicitado
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.
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.
Veja tambm
acesso de caracteres especificada com verificao de limites Original: access specified character with bounds checking 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) | |