Tutorial.StringConstructors History

Hide minor edits - Show changes to output

May 02, 2012, at 03:56 PM by Scott Fitzgerald -
Changed line 43 from:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/8.Strings/StringConstructors/StringConstructors.ino lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino lang=arduino tabwidth=4:)
November 16, 2011, at 04:24 AM by Scott Fitzgerald -
Changed line 43 from:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/8.Strings/StringConstructors/StringConstructors.pde lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/8.Strings/StringConstructors/StringConstructors.ino lang=arduino tabwidth=4:)
September 19, 2010, at 11:41 PM by Christian Cerrito -
Added lines 60-61:

September 19, 2010, at 11:36 PM by Christian Cerrito -
Changed line 25 from:
:div class=BOM :)
to:
(:div class=BOM :)
September 19, 2010, at 11:35 PM by Christian Cerrito -
Deleted lines 6-10:
(:div class=BOM :)
!!!Hardware Required
No external hardware is required.
(:divend:)
Changed lines 25-29 from:
to:
:div class=BOM :)
!!!Hardware Required
* Arduino Board
(:divend:)
Deleted line 30:
Changed lines 32-36 from:
There is no circuit for this example.
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:48 PM by Tom Igoe -
September 16, 2010, at 10:47 PM by Tom Igoe -
Changed lines 15-23 from:
String stringOne = "Hello String"; // using a constant String
String stringOne = String('a'); // converting a constant char into a String
String stringTwo = String("This is a string"); // converting a constant string into a String object
String stringOne = String(stringTwo + " with more"); // concatenating two strings
String stringOne = String(13); // using a constant integer
String stringOne = String(analogRead(0), DEC); // using an int and a base
String stringOne = String(45, HEX); // using an int and a base (hexadecimal)
String stringOne = String(255, BIN); // using an int and a base (binary)
String stringOne = String(millis(), DEC); // using a long and a base
to:
String stringOne = "Hello String"; // using a constant String
String stringOne = String('a'); // converting a constant char into a String
String stringTwo = String("This is a string"); // converting a constant string into a String object
String stringOne = String(stringTwo + " with more");// concatenating two strings
String stringOne = String(13); // using a constant integer
String stringOne = String(analogRead(0), DEC); // using an int and a base
String stringOne = String(45, HEX); // using an int and a base (hexadecimal)
String stringOne = String(255, BIN); // using an int and a base (binary)
String stringOne = String(millis(), DEC); // using a long and a base
September 16, 2010, at 10:47 PM by Tom Igoe -
Changed line 14 from:
[@
to:
(:source lang=arduino tabwidth=4:)
Changed lines 24-25 from:
@]
to:
(:sourceend:)
Changed line 41 from:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/8.Strings/StringConstructors/StringConstructors.pde lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/8.Strings/StringConstructors/StringConstructors.pde lang=arduino tabwidth=4:)
August 01, 2010, at 04:10 PM by Tom Igoe -
Changed lines 1-2 from:
''Examples > Control Structures''
to:
''Examples > Strings''
August 01, 2010, at 03:09 PM by Tom Igoe -
Changed lines 37-43 from:
'''Schematic:'''

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

to:
August 01, 2010, at 02:49 PM by Tom Igoe -
Added line 53:
* [[StringConstructors]]
August 01, 2010, at 02:35 PM by Tom Igoe -
Changed lines 5-6 from:
The String object allows you to manipulate strings of text in a variety of useful ways. You can append characters to Strings, combine Strings through concatenation, get the length of a String, search and replace substrings, and more. This tutorial shows you how to initialize String objects.
to:
The [[Reference/StringObject|String object]] allows you to manipulate strings of text in a variety of useful ways. You can append characters to Strings, combine Strings through concatenation, get the length of a String, search and replace substrings, and more. This tutorial shows you how to initialize String objects.
Changed lines 28-30 from:
All of these methods are valid ways to declare a String object. They all result in an object containing a string of characters that can be manipulated using any of the String methods.

to:
All of these methods are valid ways to declare a String object. They all result in an object containing a string of characters that can be manipulated using any of the String methods. To see them in action, upload the code below onto an Arduino and open the Serial Monitor. You'll see the results of each declaration. Compare what's printed by each println() to the declaration above it.

Changed line 34 from:
There is no circuit for this example.
to:
There is no circuit for this example.
Changed line 40 from:
There is no circuit for this example.
to:
There is no circuit for this example.
Changed lines 49-62 from:
(:divend:)
to:
(:divend:)

!!!See Also:
* [[Reference/StringObject|String object]]
* [[StringAdditionOperator]]
* [[StringIndexOf]]
* [[StringAppendOperator]]
* [[StringLengthTrim]]
* [[StringCaseChanges]]
* [[StringReplace]]
* [[StringCharacters]]
* [[StringStartsWithEndsWith]]
* [[StringComparisonOperators]]
* [[StringSubstring]]
August 01, 2010, at 02:29 PM by Tom Igoe -
Changed lines 1-49 from:
to:
''Examples > Control Structures''

!!!String Object Constructors

The String object allows you to manipulate strings of text in a variety of useful ways. You can append characters to Strings, combine Strings through concatenation, get the length of a String, search and replace substrings, and more. This tutorial shows you how to initialize String objects.

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

(:div class=code :)

[@
String stringOne = "Hello String"; // using a constant String
String stringOne = String('a'); // converting a constant char into a String
String stringTwo = String("This is a string"); // converting a constant string into a String object
String stringOne = String(stringTwo + " with more"); // concatenating two strings
String stringOne = String(13); // using a constant integer
String stringOne = String(analogRead(0), DEC); // using an int and a base
String stringOne = String(45, HEX); // using an int and a base (hexadecimal)
String stringOne = String(255, BIN); // using an int and a base (binary)
String stringOne = String(millis(), DEC); // using a long and a base
@]

(:divend:)

All of these methods are valid ways to declare a String object. They all result in an object containing a string of characters that can be manipulated using any of the String methods.


!!!Circuit

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

'''Schematic:'''

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


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

(:source
August 01, 2010, at 02:24 PM by Tom Igoe -
Added line 1:
kjlkjlkj

Share