1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Run new astyle formatter against all the examples

This commit is contained in:
Federico Fissore
2013-10-21 09:58:40 +02:00
parent 3c6ee46828
commit b4c68b3dff
259 changed files with 5160 additions and 5217 deletions

View File

@ -1,14 +1,14 @@
/*
String length()
Examples of how to use length() in a String.
String length()
Examples of how to use length() in a String.
Open the Serial Monitor and start sending characters to see the results.
created 1 Aug 2010
by Tom Igoe
http://arduino.cc/en/Tutorial/StringLengthTrim
This example code is in the public domain.
*/
@ -32,7 +32,7 @@ void loop() {
while (Serial.available() > 0) {
char inChar = Serial.read();
txtMsg += inChar;
}
}
// print the message and a notice if it's changed:
if (txtMsg.length() != lastStringLength) {
@ -41,9 +41,9 @@ void loop() {
// if the String's longer than 140 characters, complain:
if (txtMsg.length() < 140) {
Serial.println("That's a perfectly acceptable text message");
}
}
else {
Serial.println("That's too long for a text message.");
Serial.println("That's too long for a text message.");
}
// note the length for next time through the loop:
lastStringLength = txtMsg.length();