+(結合)

名称

+(結合)

説明

2つのStringオブジェクト内の文字列を結合して、新しくStringオブジェクトを作成する。2番目のStringオブジェクト内の文字列が、1番目のStringオブジェクト内の文字列の後ろに結合し、新しいStringオブジェクトを作成する。String.concat()と同様の動作をする。

書式

StringSumHelper & operator + (const StringSumHelper &lhs, const String &rhs);

StringSumHelper & operator + (const StringSumHelper &lhs, const char *cstr);

StringSumHelper & operator + (const StringSumHelper &lhs, char c);

StringSumHelper & operator + (const StringSumHelper &lhs, unsigned char num);

StringSumHelper & operator + (const StringSumHelper &lhs, int num);

StringSumHelper & operator + (const StringSumHelper &lhs, unsigned int num);

StringSumHelper & operator + (const StringSumHelper &lhs, long num);

StringSumHelper & operator + (const StringSumHelper &lhs, unsigned long num);

StringSumHelper & operator + (const StringSumHelper &lhs, float num);

StringSumHelper & operator + (const StringSumHelper &lhs, double num);

StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *rhs);

引数

lhs、rhsStringオブジェクト。
cstr文字列。
c文字。
num 整数、浮動小数点数

戻り値

引数と、もとの2つのStringオブジェクト内の文字列を結合した新しいStringオブジェクトを返す。

整数、浮動小数点数は、Stringオブジェクトに変換されてから結合される。

参照

利用例 String Tutorials

オリジナルのページ

https://www.arduino.cc/reference/en/language/variables/data-types/string/operators/concatenation/

Last Revision: 2019/02/19

最終更新日

January 4, 2024

inserted by FC2 system