std::basic_string::operator[]
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. |
reference operator[]( size_type pos ); |
||
const_reference operator[]( size_type pos ) const; |
||
Gibt einen Verweis auf den Charakter an der angegebenen Stelle
pos
. Keine Grenzen Überprüfung durchgeführt wird .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(),
- Die const-Version liefert eine Referenz auf das Zeichen mit dem Wert CharT() (das Null-Zeichen). (bis C + +11)Original:The const version returns a reference to the character with value CharT() (the null character). (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. - Beide Versionen gibt einen Verweis auf den Charakter mit dem Wert CharT() (das Null-Zeichen). Ändern der NULL-Zeichen durch nicht-const-Referenz Ergebnisse in undefiniertem Verhalten. (seit C++11)Original:Both versions returns a reference to the character with value CharT() (the null character). Modifying the null character through non-const reference results in undefined behavior. (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.
Inhaltsverzeichnis |
[Bearbeiten] Parameter
pos | - | Position des Charakters, um zurückzukehren
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. |
[Bearbeiten] Rückgabewert
Verweis auf die angeforderten Charakter
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.
[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] Siehe auch
Zugriff auf angegebene Zeichen mit Überprüfung von Grenzen 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. (öffentliche Elementfunktion) |