名前空間
変種
操作

std::basic_string

提供: cppreference.com
< cpp‎ | string


 
 
 
std::basic_string
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::basic_string
basic_string::operator=
basic_string::assign
basic_string::get_allocator
要素アクセスの循環参照を解除するために使用されている
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::at
basic_string::operator[]
basic_string::front(C++11)
basic_string::back(C++11)
basic_string::data
basic_string::c_str
イテレータ
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::begin
basic_string::cbegin

(C++11)
basic_string::end
basic_string::cend

(C++11)
basic_string::rbegin
basic_string::crbegin

(C++11)
basic_string::rend
basic_string::crend

(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.
basic_string::empty
basic_string::size
basic_string::length
basic_string::max_size
basic_string::reserve
basic_string::capacity
basic_string::shrink_to_fit(C++11)
操作
Original:
Operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::clear
basic_string::insert
basic_string::erase
basic_string::push_back
basic_string::pop_back(C++11)
basic_string::append
basic_string::operator+=
basic_string::compare
basic_string::replace
basic_string::substr
basic_string::copy
basic_string::resize
basic_string::swap
検索
Original:
Search
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::find
basic_string::rfind
basic_string::find_first_of
basic_string::find_first_not_of
basic_string::find_last_of
basic_string::find_last_not_of
定数
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::npos
非メンバ関数
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator+
operator==
operator!=
operator<
operator>
operator<=
operator>=
swap(std::basic_string)
operator<<
operator>>
getline
stoi
stol
stoll
(C++11)
(C++11)
(C++11)
stoul
stoull
(C++11)
(C++11)
stof
stod
stold
(C++11)
(C++11)
(C++11)
to_string(C++11)
to_wstring(C++11)
ヘルパークラス
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
hash<std::string>
hash<std::wstring>
hash<std::u32string>
hash<std::u16string>
(C++11)
 
Defined in header <string>
template<

    class CharT,
    class Traits = std::char_traits<CharT>,
    class Allocator = std::allocator<CharT>

> class basic_string;

クラステンプレート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 [edit]
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.
[edit]
difference_type Signed integer type (usually ptrdiff_t) [edit]
reference Allocator::reference (C++11以前)
value_type& (C++11およびそれ以降) [edit]
const_reference Allocator::const_reference (C++11以前)
const value_type& (C++11およびそれ以降) [edit]
pointer Allocator::pointer (C++11以前)
std::allocator_traits<Allocator>::pointer (C++11およびそれ以降) [edit]
const_pointer Allocator::const_pointer (C++11以前)
std::allocator_traits<Allocator>::const_pointer (C++11およびそれ以降) [edit]
iterator RandomAccessIterator [edit]
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.
[edit]
reverse_iterator std::reverse_iterator<iterator> [edit]
const_reverse_iterator std::reverse_iterator<const_iterator> [edit]

[編集] メンバ関数

basic_stringを構築します
Original:
constructs a basic_string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
文字列に値を割り当てます
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.

(パブリックメンバ関数) [edit]
文字列に文字を割り当てます
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.

(パブリックメンバ関数) [edit]
割り当てられたアロケータを返します
(パブリックメンバ関数) [edit]
要素へのアクセス
境界チェックで指定した文字にアクセスします
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.

(パブリックメンバ関数) [edit]
指定した文字にアクセスします
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.

(パブリックメンバ関数) [edit]
(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.

(パブリックメンバ関数) [edit]
(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.

(パブリックメンバ関数) [edit]
文字列の最初の文字へのポインタを返します
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.

(パブリックメンバ関数) [edit]
文字列の変更不可能な標準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.

(パブリックメンバ関数) [edit]
イテレータ
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
先頭を指すイテレータを返します
(パブリックメンバ関数) [edit]

(C++11)
末尾を指すイテレータを返します
(パブリックメンバ関数) [edit]
逆から見て先頭を指す逆イテレータを返します
(パブリックメンバ関数) [edit]
逆から見て末尾を指す逆イテレータを返します
(パブリックメンバ関数) [edit]
容量
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.

(パブリックメンバ関数) [edit]
文字数を返します
(パブリックメンバ関数) [edit]
文字の最大数を返します
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.

(パブリックメンバ関数) [edit]
埋蔵ストレージ
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.

(パブリックメンバ関数) [edit]
現在割り当てられているストレージに保持することができる文字の数を返します
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.

(パブリックメンバ関数) [edit]
未使用のメモリを解放してメモリ使用量を減らすことができます
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.

(パブリックメンバ関数) [edit]
操作
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.

(パブリックメンバ関数) [edit]
文字を挿入します
(パブリックメンバ関数) [edit]
文字を削除します
(パブリックメンバ関数) [edit]
末尾に追加文字
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.

(パブリックメンバ関数) [edit]
(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.

(パブリックメンバ関数) [edit]
末尾に文字を追加します
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.

(パブリックメンバ関数) [edit]
末尾に文字を追加します
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.

(パブリックメンバ関数) [edit]
2つの文字列を比較します
(パブリックメンバ関数) [edit]
指定した文字が出現するたびに置き換えられます
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.

(パブリックメンバ関数) [edit]
部分文字列を返します
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.

(パブリックメンバ関数) [edit]
文字をコピーします
(パブリックメンバ関数) [edit]
格納された文字の数を変更します
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.

(パブリックメンバ関数) [edit]
スワップ内容
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.

(パブリックメンバ関数) [edit]
検索
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.

(パブリックメンバ関数) [edit]
部分文字列が最後に現れる場所を見つける
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.

(パブリックメンバ関数) [edit]
文字が最初に現れる位置を見つける
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.

(パブリックメンバ関数) [edit]
文字の最初の不在を見つける
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.

(パブリックメンバ関数) [edit]
文字が最後に現れる場所を見つける
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.

(パブリックメンバ関数) [edit]
最後の文字が存在しないことを見つける
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.

(パブリックメンバ関数) [edit]

定数
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[静的]
特殊な値です。正確な意味は文脈に依存します
(パブリック静的メンバ定数) [edit]

[編集] 非メンバ関数

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.

(関数テンプレート) [edit]
辞書的に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.

(関数テンプレート) [edit]
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.

(関数テンプレート) [edit]
入力/出力
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.

(関数テンプレート) [edit]
文字列に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.

(関数) [edit]
数値変換
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.

(関数) [edit]
(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.

(関数) [edit]
(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.

(関数) [edit]
(C++11)
整数または浮動小数点数をstringに変換します
(関数) [edit]
整数または浮動小数点数をwstringに変換します
(関数) [edit]

[編集] ヘルパークラス

文字列のハッシュをサポートしています
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つの値を比較します) [edit]