std::basic_string
提供: cppreference.com
                    
                                        
                    
                    
                                                            
                    |  | このページは、Google 翻訳を使って英語版から機械翻訳されました。 
 翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 | 
| Defined in header <string>
  | ||
| template<      class CharT,  | ||
クラステンプレートbasic_stringは、charのようなオブジェクト(std::char_traitsまたは互換性のある特性クラスの特殊化が提供されるオブジェクト)のシーケンスを格納し操作します.
basic_stringの要素は、連続して格納されます。つまりbasic_string sは、[0, s.size())の範囲の任意のnに対して&*(s.begin() + n) == &*s.begin() + nが成り立ち、または、同様にs[0]へのポインタをcharT[]配列の最初の要素へのポインタを受け取る関数に渡すことができます。 (C++11およびそれ以降)
一般的な文字の種類に対する、いくつかの特殊化が提供されています
| Defined in header  <string> | |
| 型 | 定義 | 
| std::string | std::basic_string<char> | 
| std::wstring | std::basic_string<wchar_t> | 
| std::u16string | std::basic_string<char16_t> | 
| std::u32string | std::basic_string<char32_t> | 
[編集] メンバータイプ
|  メンバー·タイプ  Original:  Member type  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | Definition | 
| traits_type | Traits | 
| value_type | Traits::char_type | 
| allocator_type | Allocator | 
| size_type |  符号なし整数型(通常size_t)  Original:  Unsigned integral type (usually size_t)  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | 
| difference_type | Signed integer type (usually ptrdiff_t) | 
| reference | Allocator::reference(C++11以前)value_type&(C++11およびそれ以降) | 
| const_reference | Allocator::const_reference(C++11以前)const value_type&(C++11およびそれ以降) | 
| pointer | Allocator::pointer(C++11以前)std::allocator_traits<Allocator>::pointer (C++11およびそれ以降) | 
| const_pointer | Allocator::const_pointer (C++11以前) std::allocator_traits<Allocator>::const_pointer (C++11およびそれ以降) | 
| iterator | RandomAccessIterator | 
| const_iterator |  一定のランダムアクセス反復子を返します  Original:  Constant random access iterator  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | 
| reverse_iterator | std::reverse_iterator<iterator> | 
| const_reverse_iterator | std::reverse_iterator<const_iterator> | 
[編集] メンバ関数
| basic_stringを構築しますOriginal:  constructs a  basic_stringThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  文字列に値を割り当てます  Original:  assigns values to the string  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|   文字列に文字を割り当てます Original:   assign characters to a string The text has been machine-translated via Google Translate. 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. (パブリックメンバ関数) | |
|   指定した文字にアクセスします Original:   access specified 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 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. (パブリックメンバ関数) | 
|  文字列の最初の文字へのポインタを返します Original:  returns a pointer to the first character of a string 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. (パブリックメンバ関数) | |
|   Original:  Iterators The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (C++11) | 先頭を指すイテレータを返します (パブリックメンバ関数) | 
| (C++11) | 末尾を指すイテレータを返します (パブリックメンバ関数) | 
| (C++11) | 逆から見て先頭を指す逆イテレータを返します (パブリックメンバ関数) | 
| (C++11) | 逆から見て末尾を指す逆イテレータを返します (パブリックメンバ関数) | 
|   Original:  Capacity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
|  文字列が空であるかどうかをチェックします  Original:  checks whether the string is empty  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 文字数を返します (パブリックメンバ関数) | |
|  文字の最大数を返します  Original:  returns the maximum number of characters  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  埋蔵ストレージ  Original:  reserves storage  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  現在割り当てられているストレージに保持することができる文字の数を返します  Original:  returns the number of characters that can be held in currently allocated storage  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:  reduces memory usage by freeing unused memory  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | 
|   Original:  Operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
|  内容をクリアします Original:  clears the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 文字を挿入します (パブリックメンバ関数) | |
| 文字を削除します (パブリックメンバ関数) | |
|  末尾に追加文字 Original:  appends a character to the end 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:  removes 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. (パブリックメンバ関数) | 
|  末尾に追加の文字を Original:  appends characters to the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  末尾に追加の文字を Original:  appends characters to the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 2つの文字列を比較します (パブリックメンバ関数) | |
|  指定した文字が出現するたびに置き換えられます Original:  replaces every occurrence of specified characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  部分文字列を返します Original:  returns a substring The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 文字をコピーします (パブリックメンバ関数) | |
|  格納された文字の数を変更します  Original:  changes the number of characters stored  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  スワップ内容  Original:  swaps the contents  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|   Original:  Search The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
|  文字列内の文字を見つける Original:  find characters in the string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  部分文字列が最後に現れる場所を見つける Original:  find the last occurrence of a substring The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  文字が最初に現れる位置を見つける Original:  find first occurrence of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  文字の最初の不在を見つける Original:  find first absence of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  文字が最後に現れる場所を見つける Original:  find last occurrence of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  最後の文字が存在しないことを見つける Original:  find last absence of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
|  Original:  Constants The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| [静的] | 特殊な値です。正確な意味は文脈に依存します (パブリック静的メンバ定数) | 
[編集] 非メンバ関数
|  2つの文字列を連結または文字列とchar  Original:  concatenates two strings or a string and a char  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
|  辞書的に2つの文字列を比較する  Original:  lexicographically compares two strings  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
|  std::swapアルゴリズムを専門としています Original:  specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
|   Original:  Input/output The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
|  文字列上のストリームI / Oを実行します  Original:  performs stream I/O on strings  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
|  文字列にI / Oストリームからデータを読み取る Original:  read data from an I/O stream into a string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数) | |
|   Original:  Numeric conversions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (C++11) (C++11) (C++11) |  符号付き整数に文字列を変換します  Original:  converts a string to an signed integer  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数) | 
| (C++11) (C++11) |  符号なし整数に文字列を変換します  Original:  converts a string to an unsigned integer  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数) | 
| (C++11) (C++11) (C++11) |  浮動小数点値に文字列を変換します  Original:  converts a string to an floating point value  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数) | 
| (C++11) | 整数または浮動小数点数を stringに変換します(関数) | 
| (C++11) | 整数または浮動小数点数を wstringに変換します(関数) | 
[編集] ヘルパークラス
| (C++11) (C++11) (C++11) (C++11) |  文字列のハッシュをサポートしています  Original:  hash support for strings  The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレートの特殊化の2つの値を比較します) | 


