1
0
Fork 0
This repository has been archived on 2019-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
arduinisten/arduino-0022-linux-x64/examples/8.Strings/StringCaseChanges/StringCaseChanges.pde

36 lines
756 B
Text
Raw Normal View History

2011-02-23 21:47:18 +01:00
/*
String Case changes
Examples of how to change the case of a string
created 27 July 2010
by Tom Igoe
http://arduino.cc/en/Tutorial/StringCaseChanges
This example code is in the public domain.
*/
void setup() {
Serial.begin(9600);
Serial.println("\n\nString case changes:");
}
void loop() {
// toUpperCase() changes all letters to upper case:
String stringOne = "<html><head><body>";
Serial.println(stringOne);
stringOne = (stringOne.toUpperCase());
Serial.println(stringOne);
// toLowerCase() changes all letters to lower case:
String stringTwo = "</BODY></HTML>";
Serial.println(stringTwo);
stringTwo = stringTwo.toLowerCase();
Serial.println(stringTwo);
// do nothing while true:
while(true);
}