+ 運算子

描述

結合兩個字串成為一個新字串。第二組字串會接在第一組字串後面。與呼叫 String.concat() 的結果相同。

語法


string3 = string1 + string 2;
string3 += string2;

參數

stringstring2string3String 物件 (字串)

回傳

兩個字串結合過後的新字串

範例

StringAppendOperator

See also

String
String Addition operator


語法參考主頁面

The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.