std::basic_string::operator[]
提供: cppreference.com
< cpp | string | basic string
![]() | このページは、Google 翻訳を使って英語版から機械翻訳されました。 翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
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: 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. (パブリックメンバ関数) |