std::basic_string::operator[]
提供: 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; |
||
指定された場所の
pos
の文字への参照を返します。境界のチェックは行われません.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(),
- constバージョンは値CharT()(ヌル文字)を使用して文字への参照を返します。 (C++11以前)Original:The const version returns a reference to the character with value CharT() (the null character). (C++11以前)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - どちらのバージョンも値CharT()(ヌル文字)を使用して文字への参照を返します。未定義の動作で非const参照の結果を介してヌル文字を変更します。 (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. (C++11およびそれ以降)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
目次 |
[編集] パラメータ
pos | - | 文字の位置が戻ります
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. |
[編集] 値を返します
要求された文字への参照
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.
[編集] 複雑
定数
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.
[編集] も参照してください
境界チェックで指定した文字にアクセスします 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. (パブリックメンバ関数) |