Tutorial.StringAppendOperator History

Hide minor edits - Show changes to output

August 27, 2015, at 01:02 PM by Simone Maiocchi -
Changed line 43 from:
to:
(:divend:)
Changed line 50 from:
to:
(:divend:)
Changed lines 72-73 from:
* [[StringToIntExample|StringToInt]] - Allows you to convert a String to an integer number.
to:
* [[StringToInt]] - Allows you to convert a String to an integer number.
August 27, 2015, at 12:32 PM by Simone Maiocchi -
Changed lines 1-6 from:
(:div class=breadcrumb:)
[[Tutorial.HomePage | Tutorials]] > [[Tutorial.Examples | Examples]] > Strings> StringAppendOperator
(:divend:)

(:*toc:)
to:
(:html:)

<div class="subHeader row">

<div class="breadcrumb columns large-10 medium-10">
<p>
<a class="wikilink" href="/en/Tutorial/HomePage">Tutorials </a>
> <a class="wikilink" href="/en/Tutorial/BuiltInExamples"> Built-In Examples </a> > 08.Strings > StringAppendOperator
</p>
</div>
</div>

(:htmlend:)

Changed lines 59-71 from:
* [[Reference/StringObject|String object]]
* [[StringConstructors]]
* [[StringAdditionOperator]]
* [[StringIndexOf]]
* [[StringAppendOperator]]
* [[StringLengthTrim]]
* [[StringCaseChanges]]
* [[StringReplace]]
* [[StringCharacters]]
* [[StringStartsWithEndsWith]]
* [[StringComparisonOperators]]
* [[StringSubstring]]
to:
* [[Reference/StringObject|String object]] – Your Reference for String objects
* [[CharacterAnalysis]] - We use the operators that allow us to recognise the type of character we are dealing with.
* [[StringAdditionOperator]] - Add strings together in a variety of ways.
* [[StringCaseChanges]] - Change the case of a string.
* [[StringCharacters]] - Get/set the value of a specific character in a string.
* [[StringComparisonOperators]] - Get/set the value of a specific character in a string.
* [[StringConstructors]] - Initialize string objects.
* [[StringIndexOf]] - Look for the first/last instance of a character in a string.
* [[StringLength]] - Get the length of a string.
* [[StringLengthTrim]] - Get and trim the length of a string.
* [[StringReplace]] - Replace individual characters in a string.
* [[StringStartsWithEndsWith]] - Check which characters/substrings a given string starts or ends with.
* [[StringSubstring]] - Look for "phrases" within a given string.
* [[StringToIntExample|StringToInt]] - Allows you to convert a String to an integer number.
August 11, 2015, at 10:45 AM by Simone Maiocchi -
Changed lines 37-38 from:
There is no circuit for this example, though your board must be connected to your computer via USB.
to:
There is no circuit for this example, though your board must be connected to your computer via USB and the serial monitor window of the Arduino Software (IDE) should be open.
Changed lines 63-64 from:
to:
\\
''Last revision 2015/08/11 by SM''
July 10, 2015, at 11:29 AM by Simone Maiocchi -
Changed lines 31-32 from:
!!!Hardware Required:
to:
!!!Hardware Required
July 10, 2015, at 11:29 AM by Simone Maiocchi -
Changed lines 1-8 from:
''Examples > Strings''

!!!String Appending Operators

Just as you can concatenate Strings with other data objects using the [[StringAdditionOperator]], you can also use the @@+=@@ operator and the c@@concat()@@ method to append things to Strings. The @@+=@@ operator and the @@concat()@@ method work the same way, it's just a matter of which style you prefer. The two examples below illustrate both, and result in the same String:

(:div class=code :)
(:source lang=arduino tabwidth=4:)
to:
(:div class=breadcrumb:)
[[Tutorial.HomePage | Tutorials]] &gt; [[Tutorial.Examples | Examples]] &gt; Strings&gt; StringAppendOperator
(:divend:)

(:*toc:)

!!String Appending Operators

Just as you can concatenate Strings with other data objects using the [[StringAdditionOperator]], you can also use the @@+=@@ operator and the @@concat()@@ method to append things to Strings. The @@+=@@ operator and the @@concat()@@ method work the same way, it's just a matter of which style you prefer. The two examples below illustrate both, and result in the same String:

[@
Changed lines 16-17 from:
(:sourceend:)
to:
@]
Changed line 19 from:
(:source lang=arduino tabwidth=4:)
to:
[@
Changed lines 24-27 from:
(:sourceend:)

(:divend:)
to:
@]
Changed lines 33-34 from:
* Arduino Board
to:
* Arduino or Genuino Board
Changed lines 37-38 from:
There is no circuit for this example, though your Arduino must be connected to your computer via USB.
to:
There is no circuit for this example, though your board must be connected to your computer via USB.
Changed line 49 from:
!!!See Also:
to:
!!!See Also
March 06, 2015, at 04:02 PM by Arturo -
Changed line 18 from:
String stringOne = "A long integer: ";
to:
String stringTwo = "A long integer: ";
May 02, 2012, at 04:01 PM by Scott Fitzgerald -
Changed line 45 from:
(:source https://raw.githubusercontent.com/arduino/Arduino/master/build/shared/examples/8.Strings/StringAppendOperator/StringAppendOperator.ino lang=arduino tabwidth=4:)
to:
(:source https://raw.githubusercontent.com/arduino/Arduino/master/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino lang=arduino tabwidth=4:)
November 16, 2011, at 04:25 AM by Scott Fitzgerald -
Changed line 45 from:
(:source https://raw.githubusercontent.com/arduino/Arduino/master/build/shared/examples/8.Strings/StringAppendOperator/StringAppendOperator.pde lang=arduino tabwidth=4:)
to:
(:source https://raw.githubusercontent.com/arduino/Arduino/master/build/shared/examples/8.Strings/StringAppendOperator/StringAppendOperator.ino lang=arduino tabwidth=4:)
October 29, 2010, at 09:33 PM by Tom Igoe -
Added lines 24-25:
(:divend:)
Changed lines 28-29 from:
(:divend:)
to:
September 19, 2010, at 11:11 PM by Christian Cerrito -
Changed line 29 from:
!!!Hardware Required
to:
Added lines 61-62:

September 19, 2010, at 11:11 PM by Christian Cerrito -
Changed lines 24-27 from:
In both cases, @@stringOne@@ equals "A long integer: 123456789".

(:divend:)
to:
In both cases, @@stringOne@@ equals "A long integer: 123456789". Like the @@+@@ operator, these operators are handy for assembling longer strings from a combination of data objects.

(:divend:)
Changed lines 30-34 from:
No external hardware is required.
(:divend:)

Like the @@+@@ operator, these operators are handy for assembling longer strings from a combination of data objects.
to:
!!!Hardware Required:

* Arduino Board
Deleted line 34:
Changed lines 36-39 from:
There is no circuit for this example.
(:divend:)

to:
There is no circuit for this example, though your Arduino must be connected to your computer via USB.

%height=250px%[[Attach:Arduino_bb.png | Attach:Arduino_bb.png]]
[-image developed using [[http://www.fritzing.org |Fritzing]]. For more circuit examples, see the [[http://fritzing.org/projects/|Fritzing project page]] -]
September 16, 2010, at 10:32 PM by Tom Igoe -
Changed line 8 from:
[@
to:
(:source lang=arduino tabwidth=4:)
Changed lines 13-14 from:
@]
to:
(:sourceend:)
Changed line 17 from:
[@
to:
(:source lang=arduino tabwidth=4:)
Changed lines 22-23 from:
@]
to:
(:sourceend:)
Changed line 45 from:
(:source https://raw.githubusercontent.com/arduino/Arduino/master/build/shared/examples/8.Strings/StringAppendOperator/StringAppendOperator.pde lang=arduino tabwidth=4:)
to:
(:source https://raw.githubusercontent.com/arduino/Arduino/master/build/shared/examples/8.Strings/StringAppendOperator/StringAppendOperator.pde lang=arduino tabwidth=4:)
August 14, 2010, at 11:27 PM by Christian Cerrito -
August 14, 2010, at 11:22 PM by Christian Cerrito -
Changed line 11 from:
// using concat() to add a long variable to a string:
to:
// using += to add a long variable to a string:
August 01, 2010, at 04:11 PM by Tom Igoe -
Changed lines 1-2 from:
''Examples > Control Structures''
to:
''Examples > Strings''
August 01, 2010, at 03:21 PM by Tom Igoe -
Changed lines 33-34 from:
Like the @@+@@ operator, this
to:
Like the @@+@@ operator, these operators are handy for assembling longer strings from a combination of data objects.
August 01, 2010, at 03:18 PM by Tom Igoe -
Added lines 1-60:
''Examples > Control Structures''

!!!String Appending Operators

Just as you can concatenate Strings with other data objects using the [[StringAdditionOperator]], you can also use the @@+=@@ operator and the c@@concat()@@ method to append things to Strings. The @@+=@@ operator and the @@concat()@@ method work the same way, it's just a matter of which style you prefer. The two examples below illustrate both, and result in the same String:

(:div class=code :)
[@
String stringOne = "A long integer: ";

// using concat() to add a long variable to a string:
stringOne += 123456789;
@]

or

[@
String stringOne = "A long integer: ";

// using concat() to add a long variable to a string:
stringTwo.concat(123456789);
@]

In both cases, @@stringOne@@ equals "A long integer: 123456789".

(:divend:)

(:div class=BOM :)
!!!Hardware Required
No external hardware is required.
(:divend:)

Like the @@+@@ operator, this
!!!Circuit

(:div class=circuit :)
There is no circuit for this example.
(:divend:)


!!!Code
(:div class=code :)

(:source

Share