+(結合)

Last revision:2024/05/14

名称

+(結合)

説明

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オブジェクトに変換されてから結合される。

参照

オリジナルのページ

https://docs.arduino.cc/language-reference/en/variables/data-types/stringObject/Operators/concatenation/

最終更新日

August 16, 2026

inserted by FC2 system