std::basic_string::data
提供: cppreference.com
< cpp | string | basic string
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
const CharT* data() const; |
||
文字記憶として基になる配列へのポインタを返します。.
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.
empty()
戻りfalse、ポインタが範囲[data(); data() + size())
が有効であり、それの値が文字列に格納された値に対応するようになっている場合。 empty()
戻りtrue、ポインタが間接参照されない非ヌルポインタである場合。 (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. (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.
ポインタが範囲
[data(); data() + size()]
が有効であり、それの値がempty()
はtrueを返す場合でも、文字列に格納される値(追加のNULL文字を含む)に対応するようなものである。 (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. (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.
目次 |
[編集] ノート
data
で未定義の動作を介してアクセスされた文字配列への書き込み.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.
data()
から得られたポインタは文字列上の任意の非const操作の後に有効と見なされるべきではない.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.
以来、C + +11、
data()
c_str()
と同じ機能を実行します.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.
[編集] パラメータ
(なし)
[編集] 値を返します
そのようなdata()[i] == operator[](i)内のすべての
i
ため[0, size())
その基礎となる文字ストレージへのポインタ。 (C++11以前)Original:
Pointer to the underlying character storage such that data()[i] == operator[](i) for every
i
in [0, size())
. (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.
そのようなdata() + i == &operator[](i)内のすべての
i
ため[0, size()]
その基礎となる文字ストレージへのポインタ。 (C++11およびそれ以降)Original:
Pointer to the underlying character storage such that data() + i == &operator[](i) for every
i
in [0, size()]
. (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.
[編集] 複雑性
定数.
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.
[編集] 例外
[編集] 参照
(C++11) |
最初の文字にアクセスします 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. (パブリックメンバ関数) |
(C++11) |
最後の文字にアクセスします 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. (パブリックメンバ関数) |
文字列の変更不可能な標準Cの文字配列のバージョンを返します 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. (パブリックメンバ関数) |