std::operator+(std::basic_string)
![]() | このページは、Google 翻訳を使って英語版から機械翻訳されました。 翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (1) | |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (2) | |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (3) | |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (4) | |
template<class CharT, class Traits, class Alloc> basic_string<CharT,Traits,Alloc> | (5) | |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (6) | (C++11およびそれ以降) |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (7) | (C++11およびそれ以降) |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (8) | (C++11およびそれ以降) |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (9) | (C++11およびそれ以降) |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (10) | (C++11およびそれ以降) |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (11) | (C++11およびそれ以降) |
template<class CharT, class Traits, class Alloc > basic_string<CharT,Traits,Alloc> | (12) | (C++11およびそれ以降) |
lhs
から文字が続くrhs
からの文字を含む文字列を返します。.lhs
followed by the characters from rhs
.You can help to correct and verify the translation. Click here for instructions.
目次 |
[編集]パラメータ
lhs | - | 文字列、文字、またはNULLで終わる配列内の最初の文字へのポインタ Original: string, character, or pointer to the first character in a null-terminated array The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
rhs | - | 文字列、文字、またはNULLで終わる配列内の最初の文字へのポインタ Original: string, character, or pointer to the first character in a null-terminated array The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[編集]値を返します
1) basic_string<CharT,Traits,Alloc>(lhs).append(rhs)
2) basic_string<CharT,Traits,Alloc>(lhs)+ rhs
3) basic_string<CharT,Traits,Alloc>(1,lhs)+ rhs
4) lhs + basic_string<CharT,Traits,Alloc>(rhs)
5) lhs + basic_string<CharT,Traits,Alloc>(1,rhs)
6) std::move(lhs.append(rhs))
7) std::move(rhs.insert(0, lhs))
8) std::move(lhs.append(rhs)) or std::move(rhs.insert(0, lhs))
9) std::move(rhs.insert(0, lhs))
10) std::move(rhs.insert(0, 1, lhs))
11) std::move(lhs.append(rhs))
12) std::move(lhs.append(1, rhs))
[編集]例
#include <iostream>#include <string> int main(){std::string s1 ="Hello";std::string s2 ="world";std::cout<< s1 +' '+ s2 +"!\n";}
出力:
Hello world!
[編集]参照
末尾に追加の文字を 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. (パブリックメンバ関数) | |
文字を挿入します (パブリックメンバ関数) |